2008年11月26日

C# where

摘要: 摘自 where 子句用于指定类型约束,这些约束可以作为泛型声明中定义的类型参数的变量。 1.接口约束。 例如,可以声明一个泛型类 MyGenericClass,这样,类型参数 T 就可以实现 IComparable 接口:Code highlighting produced by Actipro ... 阅读全文

posted @ 2008-11-26 08:45 HenryWen 阅读(155) 评论(0) 推荐(0) 编辑

导航