• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            C++ Programmer's Cookbook

            {C++ 基礎} {C++ 高級} {C#界面,C++核心算法} {設計模式} {C#基礎}

            CLI與C#比較


            來自:The Most Powerful Language for .NET Framework Programming 

                        http://msdn.microsoft.com/en-us/library/ms379617(VS.80).aspx


            比較:
            Description C++/CLI C#
            Allocate reference type ReferenceType^ h = gcnew ReferenceType; ReferenceType h = new ReferenceType();
            Allocate value type ValueType v(3, 4); ValueType v = new ValueType(3, 4);
            Reference type, stack semantics ReferenceType h; N/A
            Calling Dispose method ReferenceType^ h = gcnew ReferenceType;

            delete h;

            ReferenceType h = new ReferenceType();

            ((IDisposable)h).Dispose();

            Implementing Dispose method ~TypeName() {} void IDisposable.Dispose() {}
            Implementing Finalize method !TypeName() {} ~TypeName() {}
            Boxing int^ h = 123; object h = 123;
            Unboxing int^ hi = 123;

            int c = *hi;

            object h = 123;

            int i = (int) h;

            Reference type definition ref class ReferenceType {};

            ref struct ReferenceType {};

            class ReferenceType {}
            Value type definition value class ValueType {};

            value struct ValueType {};

            struct ValueType {}
            Using properties h.Prop = 123;

            int v = h.Prop;

            h.Prop = 123;

            int v = h.Prop;

            Property definition property String^ Name
            {
                String^ get()
                {
                    return m_value;
                }
                void set(String^ value)
                {
                    m_value = value;
                }
            }
            string Name
            {
                get
                {
                    return m_name;
                }
                set
                {
                    m_name = value;
                }
            }

            thanks

            posted on 2008-06-02 14:17 夢在天涯 閱讀(4764) 評論(2)  編輯 收藏 引用 所屬分類: Manage c++ /CLI

            評論

            # re: CLI與C#比較 2008-06-03 14:11 Gohan

            這篇英文文章內容,好像以前在程序員雜志中讀過,那會兒對CLI/C++沒什么了解,受教了~~  回復  更多評論   

            # re: CLI與C#比較 2008-06-13 03:25 函數

            很強的比較哦啊  回復  更多評論   

            公告

            EMail:itech001#126.com

            導航

            統計

            • 隨筆 - 461
            • 文章 - 4
            • 評論 - 746
            • 引用 - 0

            常用鏈接

            隨筆分類

            隨筆檔案

            收藏夾

            Blogs

            c#(csharp)

            C++(cpp)

            Enlish

            Forums(bbs)

            My self

            Often go

            Useful Webs

            Xml/Uml/html

            搜索

            •  

            積分與排名

            • 積分 - 1807759
            • 排名 - 5

            最新評論

            閱讀排行榜

            亚洲精品国产字幕久久不卡| 成人资源影音先锋久久资源网| 久久国产精品久久| 一本久久久久久久| 久久久久波多野结衣高潮| 久久精品一本到99热免费| 国产精品成人精品久久久 | WWW婷婷AV久久久影片| 国产亚洲色婷婷久久99精品91| 无码8090精品久久一区| 麻豆精品久久精品色综合| 性做久久久久久久久老女人| 99久久人妻无码精品系列蜜桃| 伊色综合久久之综合久久| 久久大香香蕉国产| 综合久久给合久久狠狠狠97色| 久久精品国产亚洲沈樵| 亚洲AV乱码久久精品蜜桃| 久久久99精品成人片中文字幕| 久久精品国产精品青草| 亚洲精品美女久久777777| 亚洲精品综合久久| 久久se精品一区二区影院| 国产精品久久毛片完整版| 久久99久久99精品免视看动漫| 色婷婷综合久久久久中文字幕| 久久精品无码一区二区三区日韩 | 久久亚洲国产成人精品无码区| 久久亚洲综合色一区二区三区| 久久国产乱子伦免费精品| 久久精品国产亚洲AV忘忧草18| 亚洲欧美日韩久久精品| 久久综合五月丁香久久激情| 久久精品成人免费观看97| 免费精品99久久国产综合精品| 97久久超碰国产精品旧版| 97久久精品午夜一区二区| 国产精品9999久久久久| 人人狠狠综合久久亚洲婷婷| 久久精品中文字幕一区| 久久久久亚洲精品无码网址|