Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

ValueTuple<T1,T2,T3> Struct

Definition

Namespace:
System
Assemblies:
netstandard.dll, System.Runtime.dll
Assembly:
System.ValueTuple.dll
Assembly:
System.Runtime.dll
Assembly:
mscorlib.dll
Assembly:
netstandard.dll
Source:
ValueTuple.cs
Source:
ValueTuple.cs
Source:
ValueTuple.cs
Source:
ValueTuple.cs
Source:
ValueTuple.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Represents a value tuple with 3 components.

generic <typename T1, typename T2, typename T3>
public value class ValueTuple : IComparable, IComparable<ValueTuple<T1, T2, T3>>, IEquatable<ValueTuple<T1, T2, T3>>, System::Collections::IStructuralComparable, System::Collections::IStructuralEquatable, System::Runtime::CompilerServices::ITuple
generic <typename T1, typename T2, typename T3>
public value class ValueTuple : IComparable, IComparable<ValueTuple<T1, T2, T3>>, IEquatable<ValueTuple<T1, T2, T3>>, System::Collections::IStructuralComparable, System::Collections::IStructuralEquatable
public struct ValueTuple<T1,T2,T3> : IComparable, IComparable<(T1, T2, T3)>, IEquatable<(T1, T2, T3)>, System.Collections.IStructuralComparable, System.Collections.IStructuralEquatable, System.Runtime.CompilerServices.ITuple
public struct ValueTuple<T1,T2,T3> : IComparable, IComparable<(T1, T2, T3)>, IEquatable<(T1, T2, T3)>, System.Collections.IStructuralComparable, System.Collections.IStructuralEquatable
[System.Serializable]
public struct ValueTuple<T1,T2,T3> : IComparable, IComparable<(T1, T2, T3)>, IEquatable<(T1, T2, T3)>, System.Collections.IStructuralComparable, System.Collections.IStructuralEquatable
type ValueTuple<'T1, 'T2, 'T3> = struct
 interface ITuple
type ValueTuple<'T1, 'T2, 'T3> = struct
[<System.Serializable>]
type ValueTuple<'T1, 'T2, 'T3> = struct
 interface ITuple
Public Structure ValueTuple(Of T1, T2, T3)
Implements IComparable, IComparable(Of ValueTuple(Of T1, T2, T3)), IEquatable(Of ValueTuple(Of T1, T2, T3)), IStructuralComparable, IStructuralEquatable, ITuple
Public Structure ValueTuple(Of T1, T2, T3)
Implements IComparable, IComparable(Of ValueTuple(Of T1, T2, T3)), IEquatable(Of ValueTuple(Of T1, T2, T3)), IStructuralComparable, IStructuralEquatable

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.

Inheritance
ValueTuple<T1,T2,T3>
Attributes
Implements

Remarks

For more information about this API, see Value tuples.

Constructors

Name Description
ValueTuple<T1,T2,T3>(T1, T2, T3)

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

Fields

Name Description
Item1

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

Item2

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

Item3

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

Methods

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.

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.

ToString()

Returns a string that represents the value of this ValueTuple<T1,T2,T3> instance.

Explicit Interface Implementations

Name Description
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.

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.

ITuple.Item[Int32]

Gets the value of the specified ValueTuple element.

ITuple.Length

Gets the number of elements in the ValueTuple.

Extension Methods

Name Description
ToTuple<T1,T2,T3>(ValueTuple<T1,T2,T3>)

Converts an instance of the ValueTuple structure to an instance of the Tuple class.

Applies to


Feedback

Was this page helpful?