[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
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
C# |
---|
public int CompareTo(
Triple<TFirst, TSecond, TThird> other
) |
Visual Basic (Declaration) |
---|
Public Function CompareTo ( _
other As Triple(Of TFirst, TSecond, TThird) _
) As Integer |
Visual C++ |
---|
public:
virtual int CompareTo (
Triple<TFirst, TSecond, TThird> other
) sealed |
Parameters
- other
- 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
Exception | Condition |
---|
System..::NotSupportedException | Either FirstSecond, TSecond, or TThird is not comparable
via the IComparable<T> or IComparable interfaces. |
See Also