C#泛型声明语法:class:where T:class,new() where T:class限定泛型T为class(类),也可以直接继承任何一个类new()表示为该类创建构造函数 如下: public class BaseDAL<T> where T : class,new () { //此处略去几万行代码 }