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

            閱讀排行榜

            亚洲香蕉网久久综合影视 | 97精品国产97久久久久久免费| 久久精品国产亚洲7777| 伊人 久久 精品| 久久久青草久久久青草| 偷偷做久久久久网站| 久久最近最新中文字幕大全| 亚洲国产日韩综合久久精品| 国产精品久久波多野结衣| 伊人热热久久原色播放www| 久久精品免费观看| 久久伊人五月丁香狠狠色| 国产精品伊人久久伊人电影| 亚洲综合日韩久久成人AV| 武侠古典久久婷婷狼人伊人| 久久美女网站免费| 潮喷大喷水系列无码久久精品| 亚洲国产婷婷香蕉久久久久久| 88久久精品无码一区二区毛片 | 久久久久国产一级毛片高清版| 久久精品国产亚洲AV影院| 久久久久婷婷| 青青国产成人久久91网| 99久久中文字幕| 久久国产精品一国产精品金尊| 狠狠色丁香久久婷婷综合蜜芽五月 | 伊人久久大香线蕉AV一区二区| 久久综合九色综合97_久久久| 久久亚洲精品人成综合网| 久久久www免费人成精品| 香蕉aa三级久久毛片| 亚洲国产成人精品无码久久久久久综合 | 一本久久免费视频| 理论片午午伦夜理片久久| 青青青青久久精品国产h久久精品五福影院1421 | 久久久久波多野结衣高潮| 久久午夜综合久久| 亚洲国产成人精品女人久久久 | 色88久久久久高潮综合影院| 久久精品一本到99热免费| 久久人人爽人人爽人人片AV麻烦 |