自定义扩展Compare比较方法

1 public static int Compare<T, V>(this T x, T y, Func<T, V> func)
2 {
3     return Comparer<V>.Default.Compare(func(x), func(y));
4 }

 

posted @ 2016-12-28 16:17  追寻未来的笨鸟  阅读(305)  评论(0编辑  收藏  举报