System.Tuple<T1,T2> Class

Represents a 2-tuple, or pair.

See Also: Tuple<T1,T2> Members

Syntax

public class Tuple<T1, T2> : IStructuralComparable, IStructuralEquatable, IComparable, ITuple

Type Parameters

T1
Documentation for this section has not yet been entered.
T2
Documentation for this section has not yet been entered.

Remarks

A tuple is a data structure that has a specific number and sequence of values. The Tuple`2 class represents a 2-tuple, or pair, which is a tuple that has two components. A 2-tuple is similar to a KeyValuePair`2 structure.

You can instantiate a Tuple`2 object by calling either the Tuple`2.#ctor(`0, `1) constructor or the static Tuple.Create``2(``0, ``1) method. You can retrieve the values of the tuple's components by using the read-only Tuple`2.Item1 and Tuple`2.Item2 instance properties.

Tuples are commonly used in four different ways:

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 4.0.0.0