Exposes a method that compares two objects.
Assembly: mscorlib (in mscorlib.dll)
Thetype exposes the following members.
This interface is used in conjunction with the Array.Sort and Array.BinarySearch methods. It provides a way to customize the sort order of a collection. See the Compare method for notes on parameters and return value.
The following code example demonstrates the use of the interface to sort an ArrayList object. In this example, the interface is implemented using the CaseInsensitiveComparer class to reverse the order of the contents of the ArrayList.
.NET FrameworkSupported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
.NET Framework Client ProfileSupported in: 4, 3.5 SP1
XNA FrameworkSupported in: 3.0, 2.0, 1.0
Portable Class LibrarySupported in: Portable Class Library
Supported in: Windows Phone 8.1
Supported in: Windows Phone Silverlight 8.1
Supported in: Windows Phone Silverlight 8