<PackageReference Include="System.ValueTuple" Version="4.5.0-rc1" />

System.ValueTuple

The ValueTuple types (from arity 0 to 8) comprise the runtime implementation that underlies tuples in C# and struct tuples in F#. Aside from created via language syntax, they are most easily created via the ValueTuple.Create factory methods. The System.ValueTuple types differ from the System.Tuple types in that: - they are structs rather than classes, - they are mutable rather than readonly, and - their members (such as Item1, Item2, etc) are fields rather than properties.
public static ValueTuple Create()

Creates a new struct 0-tuple.

public static ValueTuple<T1> Create<T1>(T1 item1)

Creates a new struct 1-tuple, or singleton.

public static ValueTuple<T1, T2> Create<T1, T2>(T1 item1, T2 item2)

Creates a new struct 2-tuple, or pair.

public static ValueTuple<T1, T2, T3> Create<T1, T2, T3>(T1 item1, T2 item2, T3 item3)

Creates a new struct 3-tuple, or triple.

public static ValueTuple<T1, T2, T3, T4> Create<T1, T2, T3, T4>(T1 item1, T2 item2, T3 item3, T4 item4)

Creates a new struct 4-tuple, or quadruple.

public static ValueTuple<T1, T2, T3, T4, T5> Create<T1, T2, T3, T4, T5>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5)

Creates a new struct 5-tuple, or quintuple.

public static ValueTuple<T1, T2, T3, T4, T5, T6> Create<T1, T2, T3, T4, T5, T6>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6)

Creates a new struct 6-tuple, or sextuple.

public static ValueTuple<T1, T2, T3, T4, T5, T6, T7> Create<T1, T2, T3, T4, T5, T6, T7>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7)

Creates a new struct 7-tuple, or septuple.

public static ValueTuple<T1, T2, T3, T4, T5, T6, T7, ValueTuple<T8>> Create<T1, T2, T3, T4, T5, T6, T7, T8>(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, T8 item8)

Creates a new struct 8-tuple, or octuple.

public int CompareTo(ValueTuple other)

Compares this instance to a specified instance and returns an indication of their relative values.

public bool Equals(ValueTuple other)

Returns a value indicating whether this instance is equal to a specified value.