摘要:
enum,就是枚举类型,它是struct,int,single,double一样,都属于值类型,从ValueType类型中派生,存储在栈中。它在被创建时,不需要分配内在空间,所以对程序的性能是有好处的。为啥要引入enum呢?一个原因,就是让程序更加安全,添加程序的可读性,提高开发的效率。啥时用呢?当... 阅读全文
posted @ 2010-03-17 14:37
张占岭
阅读(6167)
评论(1)
推荐(0)
摘要:
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication2{ class Program { static void Main(string[] args) { zzl z=new zzl(); Console.WriteLine("zzl class a={0}",z.a()); zzl2 z2=new zzl2(); Console.WriteLine("zzl2 class a={0}" 阅读全文
posted @ 2010-03-17 09:51
张占岭
阅读(1335)
评论(0)
推荐(0)