摘要: 类泛型的约束:1 public static class ToModel<T> where T : class, new()定义委托:1 public delegate void SetString(string value);创建委托方法:1 private static SetString CreateStringDelegate(T model, string propertyName)2 {3 MethodInfo mi = model.GetType().GetProperty(propertyName).GetSetMethod();4 Type type = type 阅读全文
posted @ 2012-04-19 15:11 xu_happy_you 阅读(1355) 评论(3) 推荐(1) 编辑