摘要:
Dictionary是一个泛型举例:1 Dictionary dic = new Dictionary();2 3 dic.add(1,"asd");4 dic.add(2,"dssa");5 6 string a=dic[1];View Code1 var result=from s in dic... 阅读全文
摘要:
见到 public class BaseRepository where T : class,不知什么意思,查询得知:就是说T必须是一个类(class)类型,不能是结构(structure)类型。这是类型参数约束,.NET支持的类型参数约束有以下五种:where T : struct ... 阅读全文