一、class RequestHandlerBase<T, P> : IRequestHandler
where T : A<P>
where P : B,new() 含义
where表明了对类型变量T的约束关系。where T: A表示类型变量是继承于A的,或者是A本身。where T:new()指明了创建T的实例时应该使用的构造函数。
一、class RequestHandlerBase<T, P> : IRequestHandler
where T : A<P>
where P : B,new() 含义
where表明了对类型变量T的约束关系。where T: A表示类型变量是继承于A的,或者是A本身。where T:new()指明了创建T的实例时应该使用的构造函数。
转载于:https://www.cnblogs.com/Denny_Yang/archive/2013/02/02/2890278.html