C# 2.0 adds the new interface IEquatable<T>, which is implemented by those classes that need to define how two objects should be compared for equality. It defines only one method, Equals( ), which is shown here:
bool Equals(T obj)
The method returns true if obj is equal to the invoking object and false otherwise.
IEquatable<T> has been retrofitted to several classes and structures in the .NET Framework, including the numeric structures and the Char, Int32, Boolean, and String classes.