一般我们使用泛型,用在类或接口里面,通常只有一个,网上找到的例子,好像也只有一个。如果是多个,怎么写呢?
可以这样写:
public abstract class Common: Interface.ICommon where TDAL : class ,new() where TModel : class ,new() {……}
本文共 268 字,大约阅读时间需要 1 分钟。
一般我们使用泛型,用在类或接口里面,通常只有一个,网上找到的例子,好像也只有一个。如果是多个,怎么写呢?
可以这样写:
public abstract class Common: Interface.ICommon where TDAL : class ,new() where TModel : class ,new() {……}
转载于:https://www.cnblogs.com/leftfist/p/4257932.html