Wintellect.PowerCollections Namespace
Algorithms Class
GhostDoc Pro Sample Help File

Triple<(Of <(<'TFirst, TSecond, TThird>)>)>..::..CompareTo Method

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

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

Namespace:  Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax


public int CompareTo(
	Triple<TFirst, TSecond, TThird> other
)
Public Function CompareTo ( _
	other As Triple(Of TFirst, TSecond, TThird) _
) As Integer
public:
int^ CompareTo(
	Triple<TFirst, TSecond, TThird>^ other
)

Parameters

other
Type: Wintellect.PowerCollections..::..Triple<(Of <(<'TFirst, TSecond, TThird>)>)>
The triple to compare to.

Return Value

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

Exceptions


ExceptionCondition
NotSupportedExceptionEither FirstSecond, TSecond, or TThird is not comparable via the IComparable<T> or IComparable interfaces.