2011年8月2日

理解c#中的readonly,const与enum枚举

摘要: c#中的readonly,const与enum枚举大家都不会陌生偶有空就来试试此三种类型的使用问题,其实CLR via中都有啦,高手可以略过写一个测试类,如下。编译成一个单独的DLLnamespace lib{ public class jm { public const string TSString = "a const string"; public readonly static string TSReadonly = "a readonly string"; public enum TSEnum { t1 = 0 } }}再搞一个控制台程 序, 阅读全文

posted @ 2011-08-02 15:21 家猫47 阅读(436) 评论(2) 推荐(2) 编辑

导航