ImmutableArray<T>::IStructuralComparable::CompareTo Method (Object^, IComparer^)
Determines whether the current collection element precedes, occurs in the same position as, or follows another element in the sort order.
Assembly: System.Collections.Immutable (in System.Collections.Immutable.dll)
private: virtual int CompareTo( Object^ other, IComparer^ comparer ) sealed = IStructuralComparable::CompareTo
Parameters
- other
-
Type:
System::Object^
The element to compare with the current instance.
- comparer
-
Type:
System.Collections::IComparer^
The object used to compare members of the current array with the corresponding members of other array.
Return Value
Type: System::Int32An integer that indicates whether the current element precedes, is in the same position or follows the other element.
| Exception | Condition |
|---|---|
| ArgumentException | The arrays are not the same length. |
This member is an explicit interface member implementation. It can be used only when the ImmutableArray<T> instance is cast to an IStructuralComparable interface.
Show: