ValueTuple<T1, T2, T3, T4, T5, T6> Structure

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Represents a value tuple with 6 components.

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

[SerializableAttribute]
public struct ValueTuple<T1, T2, T3, T4, T5, T6> : IEquatable<ValueTuple<T1, T2, T3, T4, T5, T6>>, 
	IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3, T4, T5, T6>>, 
	ITuple

Type Parameters

T1

The type of the value tuple's first element.

T2

The type of the value tuple's second element.

T3

The type of the value tuple's third element.

T4

The type of the value tuple's fourth element.

T5

The type of the value tuple's fifth element.

T6

The type of the value tuple's sixth element.

NameDescription
System_CAPS_pubmethodValueTuple<T1, T2, T3, T4, T5, T6>(T1, T2, T3, T4, T5, T6)

Initializes a new ValueTuple<T1, T2, T3, T4, T5, T6> instance.

NameDescription
System_CAPS_pubmethodCompareTo(ValueTuple<T1, T2, T3, T4, T5, T6>)

Compares the current ValueTuple<T1, T2, T3, T4, T5, T6> instance to a specified ValueTuple<T1, T2, T3, T4, T5, T6> instance.

System_CAPS_pubmethodEquals(Object)

Returns a value that indicates whether the current ValueTuple<T1, T2, T3, T4, T5, T6> instance is equal to a specified object.(Overrides ValueType.Equals(Object).)

System_CAPS_pubmethodEquals(ValueTuple<T1, T2, T3, T4, T5, T6>)

Returns a value that indicates whether the current ValueTuple<T1, T2, T3, T4, T5, T6> instance is equal to a specified ValueTuple<T1, T2, T3, T4, T5, T6> instance.

System_CAPS_pubmethodGetHashCode()

Calculates the hash code for the current ValueTuple<T1, T2, T3, T4, T5, T6> instance.(Overrides ValueType.GetHashCode().)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the value of this ValueTuple<T1, T2, T3, T4, T5, T6> instance. (Overrides ValueType.ToString().)

NameDescription
System_CAPS_pubfieldItem1

Gets the value of the current ValueTuple<T1, T2, T3, T4, T5, T6> instance's first element.

System_CAPS_pubfieldItem2

Gets the value of the current ValueTuple<T1, T2, T3, T4, T5, T6> instance's second element.

System_CAPS_pubfieldItem3

Gets the value of the current ValueTuple<T1, T2, T3, T4, T5, T6> instance's third element.

System_CAPS_pubfieldItem4

Gets the value of the current ValueTuple<T1, T2, T3, T4, T5, T6> instance's fourth element.

System_CAPS_pubfieldItem5

Gets the value of the current ValueTuple<T1, T2, T3, T4, T5, T6> instance's fifth element.

System_CAPS_pubfieldItem6

Gets the value of the current ValueTuple<T1, T2, T3, T4, T5, T6> instance's sixth element.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIStructuralComparable.CompareTo(Object, IComparer)

Compares the current ValueTuple<T1, T2, T3, T4, T5, T6> instance to a specified object by using a specified comparer and returns an integer that indicates whether the current object is before, after, or in the same position as the specified object in the sort order.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIStructuralEquatable.Equals(Object, IEqualityComparer)

Returns a value that indicates whether the current ValueTuple<T1, T2, T3, T4, T5, T6> instance is equal to a specified object based on a specified comparison method.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIStructuralEquatable.GetHashCode(IEqualityComparer)

Calculates the hash code for the current ValueTuple<T1, T2, T3, T4, T5, T6> instance by using a specified computation method.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIComparable.CompareTo(Object)

Compares the current ValueTuple<T1, T2, T3, T4, T5, T6> instance to a specified object by using a specified comparer and returns an integer that indicates whether the current object is before, after, or in the same position as the specified object in the sort order.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyITuple.Item[Int32]

Gets the value of the specified ValueTuple element.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyITuple.Length

Gets the number of elements in the ValueTuple.

A value tuple is a data structure that has a specific number and sequence of values. The ValueTuple<T1, T2, T3, T4, T5, T6> structure represents a value tuple that has six elements.

The value tuple types differ from the tuple types (such as Tuple<T1, T2, T3, T4, T5, T6>) as follows:

  • They are structures (value types) rather than classes (reference types).

  • Members such as Item1 and Item2 are fields rather than properties.

  • Their fields are mutable rather than read-only.

The value tuple types provide the runtime implementation that supports tuples in C# and struct tuples in F#. In addition to creating a ValueTuple<T1, T2, T3, T4, T5, T6> instance by using language syntax, you can call the Create<T1, T2, T3, T4, T5, T6> factory method.

.NET Framework
Available since 4.7

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

Return to top
Show: