• <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++ 基礎(chǔ)} {C++ 高級(jí)} {C#界面,C++核心算法} {設(shè)計(jì)模式} {C#基礎(chǔ)}

            CLI與C#比較


            來(lái)自: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 夢(mèng)在天涯 閱讀(4764) 評(píng)論(2)  編輯 收藏 引用 所屬分類: Manage c++ /CLI

            評(píng)論

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

            這篇英文文章內(nèi)容,好像以前在程序員雜志中讀過(guò),那會(huì)兒對(duì)CLI/C++沒(méi)什么了解,受教了~~  回復(fù)  更多評(píng)論   

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

            很強(qiáng)的比較哦啊  回復(fù)  更多評(píng)論   

            公告

            EMail:itech001#126.com

            導(dǎo)航

            統(tǒng)計(jì)

            • 隨筆 - 461
            • 文章 - 4
            • 評(píng)論 - 746
            • 引用 - 0

            常用鏈接

            隨筆分類

            隨筆檔案

            收藏夾

            Blogs

            c#(csharp)

            C++(cpp)

            Enlish

            Forums(bbs)

            My self

            Often go

            Useful Webs

            Xml/Uml/html

            搜索

            •  

            積分與排名

            • 積分 - 1807508
            • 排名 - 5

            最新評(píng)論

            閱讀排行榜

            99re久久精品国产首页2020| 久久国产精品成人影院| 色综合久久中文综合网| 国产农村妇女毛片精品久久| 久久人人爽人人爽AV片| 精品久久亚洲中文无码| 久久精品国产69国产精品亚洲| 久久久久一本毛久久久| 97精品依人久久久大香线蕉97 | 国内精品九九久久久精品| 久久本道伊人久久| 国产精品99久久久久久宅男小说| 91精品国产综合久久精品| 三级韩国一区久久二区综合 | 伊人热热久久原色播放www| 午夜精品久久久久久中宇| 国产激情久久久久影院| 久久亚洲欧美国产精品| 国产精品中文久久久久久久| 色偷偷888欧美精品久久久| 久久综合88熟人妻| 热久久视久久精品18| 国产免费久久精品丫丫| 久久婷婷国产麻豆91天堂| 麻豆成人久久精品二区三区免费| 久久青青草视频| 日韩一区二区三区视频久久| 国产精品热久久毛片| 久久久久久久尹人综合网亚洲| 亚洲综合精品香蕉久久网| 久久精品国产乱子伦| 久久这里的只有是精品23| 亚洲人AV永久一区二区三区久久 | 亚洲综合精品香蕉久久网97 | 久久精品国产亚洲5555| 9999国产精品欧美久久久久久| 欧美精品一区二区精品久久| 久久99精品国产99久久| 久久久91精品国产一区二区三区| 色成年激情久久综合| 婷婷久久综合|