2011年5月9日

摘要: 在这个例子当中,泛型的出色之处在于,不必为每个类型编写相同的代码讲阅读器的数据转换为泛型List。1.GenericMethods类public class GenericMethods{ public static List<T> GetListFromCommand<T>(SqlCommand command) where T : ICreatable, new() { List<T> list = new List<T>(); using (command.Connection) { command.Connection.Open(); S 阅读全文
posted @ 2011-05-09 02:47 Scarface 阅读(576) 评论(0) 推荐(0)

导航