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

            搜索

            •  

            積分與排名

            • 積分 - 1807502
            • 排名 - 5

            最新評論

            閱讀排行榜

            99久久精品免费看国产一区二区三区 | 久久综合给合久久狠狠狠97色69| 久久久受www免费人成| 日本精品一区二区久久久| 麻豆av久久av盛宴av| 亚洲精品无码专区久久久| av午夜福利一片免费看久久| 久久国产免费直播| 久久久久亚洲AV无码永不| 91麻精品国产91久久久久| 精产国品久久一二三产区区别| 久久免费精品一区二区| 色综合久久中文字幕综合网| 潮喷大喷水系列无码久久精品 | 久久精品视频91| 久久精品亚洲一区二区三区浴池 | 岛国搬运www久久| 日本久久中文字幕| 国产精品视频久久久| 久久亚洲AV无码精品色午夜| 精品久久久久久无码免费| 久久免费线看线看| 国内精品伊人久久久久av一坑| 一日本道伊人久久综合影| 91精品无码久久久久久五月天| 久久精品天天中文字幕人妻| 久久久久久亚洲精品影院| 久久无码国产| 久久中文字幕无码专区| 91久久精品电影| 国产成人久久精品二区三区| 久久精品国产精品亚洲精品| 久久99国产综合精品免费| 少妇久久久久久被弄高潮| 色88久久久久高潮综合影院| 久久亚洲AV无码精品色午夜麻豆 | 国产精品久久久久影院嫩草 | 久久99国产精品久久99小说| 亚洲国产精品无码久久九九| 久久伊人五月天论坛| 欧美亚洲国产精品久久|