摘要:
类泛型的约束: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 阅读全文