interface IComparer

in global :: System . Collections

Exposes a method that compares two objects.


public int Compare( object x, object y )

Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.

  • x The first object to compare.
  • y The second object to compare.
  • Returns A signed integer that indicates the relative values of and : - If less than 0, is less than . - If 0, equals . - If greater than 0, is greater than .