Updated: July 2008
Defines a generalized type-specific comparison method that a value type or class implements to order or sort its instances.
Assembly: mscorlib (in mscorlib.dll)
This interface is implemented by types whose values can be ordered or sorted. It requires that implementing types define a single method, CompareTo, that indicates whether the position of the current instance in the sort order is before, after, or the same as a second object of the same type. The instance's implementation is called automatically by methods such as Array.Sort and ArrayList.Sort.
All numeric types (such as Int32 and Double) implement , as do String, Char, and DateTime. Custom types should also provide their own implementation of to enable object instances to be ordered or sorted.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC, Xbox 360, Zune
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.