Search notes:

System.IComparable (Interface)

The System.IComparable interface is required for objects to be able to be sorted or ordered.
IComparable specifies one method public int CompareTo (object obj);
A return value of less than zero indicates that this instances is to be sorted after obj. If the return value is greater than zero, it indicates that this instance is to be sorted after obj and 0 indicates that both instances have the same position.

See also

This PowerShell example that demonstrates how a PowerShell class implements IComparable and overrides Equals() and GetHashCode().

Index