• <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 夢在天涯 閱讀(4759) 評論(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

            搜索

            •  

            積分與排名

            • 積分 - 1804159
            • 排名 - 5

            最新評論

            閱讀排行榜

            理论片午午伦夜理片久久| 久久久久国产精品| 一本色道久久综合狠狠躁篇| 久久婷婷五月综合色奶水99啪| 久久综合久久综合亚洲| 亚洲国产精品无码久久久不卡| 久久国产亚洲精品麻豆| 久久人人超碰精品CAOPOREN| 一本久久a久久精品亚洲| 久久AV高清无码| 久久频这里精品99香蕉久| 久久亚洲中文字幕精品有坂深雪 | 国产aⅴ激情无码久久| 99久久99久久| 久久人人爽人人爽人人片AV不 | 久久久久无码精品| 99久久99久久精品国产片果冻| 久久久青草青青亚洲国产免观 | 2021久久精品国产99国产精品| 精品综合久久久久久88小说| 久久精品aⅴ无码中文字字幕重口| 久久精品无码免费不卡| 久久综合丝袜日本网| 99久久久精品| 久久精品中文无码资源站| 亚洲伊人久久综合影院| 精品久久久久久国产牛牛app| 99精品久久久久中文字幕| 男女久久久国产一区二区三区| 久久精品成人| 久久精品成人免费国产片小草| 国产一级做a爰片久久毛片| 久久国产精品99国产精| 久久久无码人妻精品无码| 97精品伊人久久久大香线蕉| 久久亚洲sm情趣捆绑调教| 久久久久无码精品国产app| 久久久久人妻一区精品 | 色偷偷888欧美精品久久久| 精品乱码久久久久久久| www.久久热.com|