Tuple Class

Provides static methods for creating tuple objects.

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

public static class Tuple

Tuple is a factory class that provides static methods for creating instances of the tuple types supported by the .NET Framework. It provides helper methods that can be called to instantiate particular tuple objects without requiring that you explicitly specify the type of each tuple component.

Helper methods directly support the creation of tuple objects that have from one to eight components (that is, singletons through octuples). Although there is no practical limit to the number of components a tuple may have, helper methods are not available to create a tuple with nine or more components. To create such a tuple, you must call the constructor.

The following example creates an 8-tuple (octuple) that contains prime numbers that are less than 20.


var primes = Tuple.Create(2, 3, 5, 7, 11, 13, 17, 19);


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Community Additions

Show: