Click or drag to resize
PairTFirst, TSecondCompareTo Method

Compares this pair to another pair of the some type. The pairs are compared by using the IComparable<T> or IComparable interface on TFirst and TSecond. The pairs are compared by their first elements first, if their first elements are equal, then they are compared by their second elements.

If either TFirst or TSecond does not implement IComparable<T> or IComparable, then an NotSupportedException is thrown, because the pairs cannot be compared.

Namespace: X3Platform.Collections
Assembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntax
public int CompareTo(
	Pair<TFirst, TSecond> other
)

Parameters

other
Type: X3Platform.CollectionsPairTFirst, TSecond
The pair to compare to.

Return Value

Type: Int32
An integer indicating how this pair compares to other. Less than zero indicates this pair is less than other. Zero indicate this pair is equals to other. Greater than zero indicates this pair is greater than other.

Implements

IComparableTCompareTo(T)
Exceptions
ExceptionCondition
NotSupportedExceptionEither FirstSecond or TSecond is not comparable via the IComparable<T> or IComparable interfaces.
See Also