예제 #1
0
 /// <summary>
 /// 对象去重
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="list"></param>
 /// <param name="comparer">对比委托</param>
 /// <returns></returns>
 public static IEnumerable <T> ToDist <T>(this IEnumerable <T> list, Func <T, T, bool> comparer) where T : new()
 {
     return(ListHelper.ToDist(list, comparer));
 }
예제 #2
0
 public static IEnumerable <TKey> ToDist <T, TKey>(this IEnumerable <T> list, Func <T, TKey> key, IEqualityComparer <TKey> comparer = null)
 {
     return(ListHelper.ToDist(list, key, comparer));
 }