System.Tuple<T1, T2, T3, T4, T5, T6, T7, T8> Class

Namespace: System

Represents a strongly typed, immutable tuple whose items can be of different types. A tuple is a data structure that contains a fixed number of elements. This specific class represents a tuple with eight elements.

Syntax


public sealed class Tuple<T1, T2, T3, T4, T5, T6, T7, T8>
    where T1 : notnull
    where T2 : notnull
    where T3 : notnull
    where T4 : notnull
    where T5 : notnull
    where T6 : notnull
    where T7 : notnull
    where T8 : notnull

The Tuple<T1, T2, T3, T4, T5, T6, T7, T8> class is a generic class in the .NET Framework that allows you to group eight values of potentially different types into a single object. It is immutable, meaning its values cannot be changed after creation.

Constructors

Member Description
Tuple(T1, T2, T3, T4, T5, T6, T7, T8) Initializes a new instance of the Tuple<T1, T2, T3, T4, T5, T6, T7, T8> class by assigning a value to each component of the tuple.

Properties

Member Description
Item1 T1 Gets the value of the first component of this tuple.
Item2 T2 Gets the value of the second component of this tuple.
Item3 T3 Gets the value of the third component of this tuple.
Item4 T4 Gets the value of the fourth component of this tuple.
Item5 T5 Gets the value of the fifth component of this tuple.
Item6 T6 Gets the value of the sixth component of this tuple.
Item7 T7 Gets the value of the seventh component of this tuple.
Item8 T8 Gets the value of the eighth component of this tuple.

Methods

Member Description
CompareTo(ITuple other) Compares the current tuple with another tuple.
Equals(object obj) Determines whether the current tuple is equal to another object.
GetHashCode() Returns the hash code for the current tuple.
ToString() Returns the string representation of the current tuple.

See Also