自定义泛型委托对象

 1 //自定义泛型委托对象
 2        public delegate void PrintT<T>(T t);
 3        public static void TEach<T>(this List<T> ls,PrintT<T> pt)
 4        {
 5           
 6            foreach (T t in ls)
 7            {
 8                pt(t);
 9            }
10        }
原文地址:https://www.cnblogs.com/dqh123/p/9470562.html