Click or drag to resize
TripleTFirst, TSecond, TThird Structure
Stores a triple of objects within a single struct. This struct is useful to use as the T of a collection, or as the TKey or TValue of a dictionary.

Namespace: X3Platform.Collections
Assembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntax
[SerializableAttribute]
public struct Triple<TFirst, TSecond, TThird> : IComparable, 
	IComparable<Triple<TFirst, TSecond, TThird>>

Type Parameters

TFirst

[Missing <typeparam name="TFirst"/> documentation for "T:X3Platform.Collections.Triple`3"]

TSecond

[Missing <typeparam name="TSecond"/> documentation for "T:X3Platform.Collections.Triple`3"]

TThird

[Missing <typeparam name="TThird"/> documentation for "T:X3Platform.Collections.Triple`3"]

The TripleTFirst, TSecond, TThird type exposes the following members.

Constructors
Methods
  NameDescription
Public methodCompareTo

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.

Public methodEquals(Object)
Determines if this triple is equal to another object. The triple is equal to another object if that object is a Triple, all element types are the same, and the all three elements compare equal using object.Equals.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(TripleTFirst, TSecond, TThird)
Determines if this triple is equal to another triple. Two triples are equal if the all three elements compare equal using IComparable<T>.Equals or object.Equals.
Public methodGetHashCode
Returns a hash code for the triple, suitable for use in a hash-table or other hashed collection. Two triples that compare equal (using Equals) will have the same hash code. The hash code for the triple is derived by combining the hash codes for each of the two elements of the triple.
(Overrides ValueTypeGetHashCode.)
Public methodGetType (Inherited from Object.)
Public methodToString
Returns a string representation of the triple. The string representation of the triple is of the form: First: {0}, Second: {1}, Third: {2} where {0} is the result of First.ToString(), {1} is the result of Second.ToString(), and {2} is the result of Third.ToString() (or "null" if they are null.)
(Overrides ValueTypeToString.)
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Determines if two triples are equal. Two triples are equal if the all three elements compare equal using IComparable<T>.Equals or object.Equals.
Public operatorStatic memberInequality
Determines if two triples are not equal. Two triples are equal if the all three elements compare equal using IComparable<T>.Equals or object.Equals.
Top
Fields
  NameDescription
Public fieldFirst
The first element of the triple.
Public fieldSecond
The second element of the triple.
Public fieldThird
The thrid element of the triple.
Top
See Also