This topic has not yet been rated - Rate this topic

IComparer Interface

Exposes a method that compares two objects.

Namespace:  System.Collections
Assembly:  mscorlib (in mscorlib.dll)
[ComVisibleAttribute(true)]
public interface IComparer

The IComparer type exposes the following members.

  Name Description
Public method Supported by Silverlight for Windows Phone Supported by Xbox 360 Compare Compares 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.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ