ValueTuple<T1, T2, T3> Structure
Represents a value tuple with 3 components.
Assembly: mscorlib (in mscorlib.dll)
generic<typename T1, typename T2, typename T3> public value struct ValueTuple : IEquatable<ValueTuple<T1, T2, T3>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3>>
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.
| Name | Description | |
|---|---|---|
![]() | ValueTuple<T1, T2, T3>(T1, T2, T3) | Initializes a new ValueTuple<T1, T2, T3> instance. |
| Name | Description | |
|---|---|---|
![]() | CompareTo(ValueTuple<T1, T2, T3>) | Compares the current ValueTuple<T1, T2, T3> instance to a specified ValueTuple<T1, T2, T3> instance. |
![]() | Equals(Object^) | Returns a value that indicates whether the current ValueTuple<T1, T2, T3> instance is equal to a specified object.(Overrides ValueType::Equals(Object^).) |
![]() | Equals(ValueTuple<T1, T2, T3>) | Returns a value that indicates whether the current ValueTuple<T1, T2, T3> instance is equal to a specified ValueTuple<T1, T2, T3> instance. |
![]() | GetHashCode() | Calculates the hash code for the current ValueTuple<T1, T2, T3> instance.(Overrides ValueType::GetHashCode().) |
![]() | GetType() | |
![]() | ToString() | Returns a string that represents the value of this ValueTuple<T1, T2, T3> instance. (Overrides ValueType::ToString().) |
| Name | Description | |
|---|---|---|
![]() ![]() | IStructuralComparable::CompareTo(Object^, IComparer^) | Compares the current ValueTuple<T1, T2, T3> 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. |
![]() ![]() | IStructuralEquatable::Equals(Object^, IEqualityComparer^) | Returns a value that indicates whether the current ValueTuple<T1, T2, T3> instance is equal to a specified object based on a specified comparison method. |
![]() ![]() | IStructuralEquatable::GetHashCode(IEqualityComparer^) | Calculates the hash code for the current ValueTuple<T1, T2, T3> instance by using a specified computation method. |
![]() ![]() | IComparable::CompareTo(Object^) | Compares the current ValueTuple<T1, T2, T3> 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. |
A value tuple is a data structure that has a specific number and sequence of values. The ValueTuple<T1, T2, T3> structure represents a value tuple that has three elements.
The value tuple types differ from the tuple types (such as Tuple<T1, T2, T3>) 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> instance by using language syntax, you can call the Create<T1, T2, T3> factory method.
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.



