C# where 关键字

首先贴出一段代码函数 public class BusinessBaseBLL<T, S> : BaseBLL<T, S> where T : new() where S : BusinessDAL<T>, new() 看到第一点感受本身就蒙了,接触C#这么久,尽然怎么会用where,也不是很明白,今天查了一下msdn(点击打开连接),才明白,原来where是约束泛型的。spa 就像 code B
相关文章
相关标签/搜索