摘要:
一、运算符作为参数传递C++中是有std::less和std::greater运算符的,但是C#里没有,所以就需要自己先定义。static class Functor{ static Func<T, T, bool> Greater<T>() where T : IComparable<T> { return delegate(T lhs, T rhs) { return lhs.CompareTo(rhs) > 0; }; } static Func<T, T, bool> Less<T>() where T : ICompa 阅读全文