Is there already a comparison-interface in the framework
which is equivalent to
interface ISomeKindOfCompare<T>
{
bool Matches(T item);
}
I know IComparer and IEqualityComparer and so on, but that's 开发者_StackOverflownot what I am looking for.
IEquatable<T>
looks the same as your ISomeKindOfCompare<T>
. That is, it lets you ask "is this object equal to some T
?".
IComparable? IEquatable<T>
?
精彩评论