泛型

CollectionClass<ItemClass> col = new CollectionClass<ItemClass>();

col.Add(new ItemClass);

可空类型

System.Nullable<type>  缩写为  type?

例如: System.Nullable<int> myInt  相当于  int? myInt

??运算符

int? opl = null;

int result = op1*2 ?? 5

若op1为null,则将5赋给result。

List<T> myCollection = new List<T>();

posted @ 2011-07-18 17:11  绯色卡卡  阅读(110)  评论(0)    收藏  举报