BCL mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ] 1.0.5000.0 2.0.0.0 4.0.0.0

Provides a mechanism to customize the sort ordering of a collection.

The default implementation of this interface is .

contains the method. The consumer of an object should call this method when sorting members of a collection.

- Method
  System.Int32 `` `` First to compare. Second to compare.

  Returns the sort order of two instances.

  The return value is a negative number, zero, or a positive number reflecting the sort order of as compared to . For non-zero return values, the exact value returned by this method is unspecified. The following table defines the return value:

  Value
  Condition
  A negative number
  < .
  Zero
  == .
  A positive number
  > .

  For any objects A, B, and C, the following are required to be true:

  (A, A) is required to return zero.

  If (A, B) returns zero, then (B, A) is required to return zero.

  If (A, B) returns zero and (B, C) returns zero then (A, C) is required to return zero.

  If (A, B) returns a value other than zero, then (B, A) is required to return a value of the opposite sign.

  If (A, B) returns a value x not equal to zero, and (B, C) returns a value y of the same sign as x, then (A, C) is required to return a value of the same sign as x and y.

  The exact ordering of this method is unspecified. The intent of the method is to provide a mechanism that orders instances of a class in a manner that is consistent with the mathematical definitions of the relational operators (<, >, and ==), without regard for class-specific definitions of the operators.

  This interface is used in conjunction with the and methods.

  0
  1.0.5000.0
  2.0.0.0
  4.0.0.0
0 System.Runtime.InteropServices.ComVisible(true)