• <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

            最新評論

            閱讀排行榜

            一本久久综合亚洲鲁鲁五月天| 久久精品蜜芽亚洲国产AV| 国产V亚洲V天堂无码久久久| 激情伊人五月天久久综合| 久久精品国产亚洲AV高清热| 久久亚洲国产欧洲精品一| 久久久久国产一级毛片高清板| 国产一区二区久久久| 久久精品国产亚洲AV大全| 久久人人爽人人爽人人片AV麻豆 | 伊人久久综在合线亚洲2019| 香蕉99久久国产综合精品宅男自 | 伊人 久久 精品| 久久精品国产久精国产思思| 久久久艹| 久久综合狠狠色综合伊人| 伊人久久大香线蕉成人| 热99re久久国超精品首页| 一本大道久久香蕉成人网| 精品无码久久久久久久久久| 伊人久久久AV老熟妇色| 国产69精品久久久久99尤物| 久久久久亚洲av无码专区导航| 久久久久人妻一区精品果冻| 潮喷大喷水系列无码久久精品| 亚洲国产成人久久综合一区77| 91精品婷婷国产综合久久| 久久精品一本到99热免费| 伊人久久精品无码二区麻豆| 日韩欧美亚洲国产精品字幕久久久 | 99久久人人爽亚洲精品美女| 久久不见久久见免费视频7| 精品熟女少妇AV免费久久| 综合久久精品色| 少妇久久久久久被弄到高潮 | 欧美伊人久久大香线蕉综合| 久久久综合香蕉尹人综合网| 国产精自产拍久久久久久蜜| 中文字幕久久欲求不满| 99久久综合狠狠综合久久| 国产AV影片久久久久久|