mscorlib 4.0.0.0 System.Object

The class returns the following two predefined comparison objects:

An implementation that can be passed to a method such as or to perform a structural comparison of two objects. It is designed to indicate whether the first object precedes, follows, or occurs in the same position as the second object in the sort order.

An implementation that can be passed to a method such as or to perform a comparison for structural equality.

The objects can be used to perform a structural comparison or a structural equality comparison of two collection objects, such as array or tuple objects. In structural comparison, two objects are compared based on their values. Objects can be ordered based on some criteria, and two objects are considered equal when they have equal values, not because they reference the same physical object

Provides objects for performing a structural comparison of two collection objects.

- Property
  4.0.0.0
  System.Collections.IComparer To be added.

  When the object returned by this property is passed to the comparison method of a collection object, such as or , its method is called for each member of an array or for each component of a tuple. This implementation of the method behaves as follows when it compares each item of a collection object with the corresponding item of another collection object:

  It considers two items that are null to be equal, and considers a null item to be less than an item that is not null.

  If the first item in the comparison can be cast to an object (in other words, if it is a collection object that implements the interface), it calls the method.

  If the first item in the comparison cannot be cast to an object (in other words, if it is not a collection object that implements the interface), it calls the Comparer.Default.Compare method.

  Gets a predefined object that performs a structural comparison of two objects.

- Property
  4.0.0.0
  System.Collections.IEqualityComparer To be added.

  When the object returned by this property is passed to the equality comparison method of a collection object, such as or , its method is called for each member of an array or for each component of a tuple. This implementation of the method behaves as follows when it compares each item of a collection object with the corresponding item of another collection object:

  If both items are null, it considers the two items to be equal.

  If one item is null but the other item is not, it considers the two items to be unequal.

  If the first item in the comparison can be cast to an object (in other words, if it is a collection object that implements the interface), it calls the method.

  If the first item in the comparison cannot be cast to an object (in other words, if it is not a collection object that implements the interface), it calls the item's Equals method.

  Gets a predefined object that compares two objects for structural equality.