IComparer Interface

Exposes a method that compares two objects.

Namespace:  System.Collections
Assembly:  mscorlib (in mscorlib.dll)

No code example is currently available or this language may not be supported.

The IComparer type exposes the following members.

  NameDescription
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360CompareCompares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
Top

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.

For the generic version of this interface, see System.Collections.Generic::IComparer<T>.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: