摘要:
[csharp]view plaincopypublic class Reflect where T : class{ 这是参数类型约束,指定T必须是Class类型。.NET支持的类型参数约束有以下五种:where T : struct | T必须是一个结构类型wher... 阅读全文
摘要:
转载:C#中的泛型摘自:http://birdshover.cnblogs.com/articles/392127.html泛型(generic)是C#语言2.0和通用语言运行时(CLR)的一个新特性。泛型为.NET框架引入了类型参数(type parameters)的概念。类型参数使得设计类和方法... 阅读全文