System.ValueTuple
Indicates that the use of on a member is meant to be treated as a tuple with element names.
Initializes a new instance of the class.
Specifies, in a pre-order depth-first traversal of a type's
construction, which occurrences are
meant to carry element names.
This constructor is meant to be used on types that contain an
instantiation of that contains
element names. For instance, if C is a generic type with
two type parameters, then a use of the constructed type C{, might be intended to
treat the first type argument as a tuple with element names and the
second as a tuple without element names. In which case, the
appropriate attribute specification should use a
transformNames value of { "name1", "name2", null, null,
null }.
Specifies, in a pre-order depth-first traversal of a type's
construction, which elements are
meant to carry element names.
Provides extension methods for instances to interop with C# tuples features (deconstruction syntax, converting from and to ).
Deconstruct a properly nested with 1 elements.
Deconstruct a properly nested with 2 elements.
Deconstruct a properly nested with 3 elements.
Deconstruct a properly nested with 4 elements.
Deconstruct a properly nested with 5 elements.
Deconstruct a properly nested with 6 elements.
Deconstruct a properly nested with 7 elements.
Deconstruct a properly nested with 8 elements.
Deconstruct a properly nested with 9 elements.
Deconstruct a properly nested with 10 elements.
Deconstruct a properly nested with 11 elements.
Deconstruct a properly nested with 12 elements.
Deconstruct a properly nested with 13 elements.
Deconstruct a properly nested with 14 elements.
Deconstruct a properly nested with 15 elements.
Deconstruct a properly nested with 16 elements.
Deconstruct a properly nested with 17 elements.
Deconstruct a properly nested with 18 elements.
Deconstruct a properly nested with 19 elements.
Deconstruct a properly nested with 20 elements.
Deconstruct a properly nested with 21 elements.
Make a properly nested from a properly nested with 1 element.
Make a properly nested from a properly nested with 2 elements.
Make a properly nested from a properly nested with 3 elements.
Make a properly nested from a properly nested with 4 elements.
Make a properly nested from a properly nested with 5 elements.
Make a properly nested from a properly nested with 6 elements.
Make a properly nested from a properly nested with 7 elements.
Make a properly nested from a properly nested with 8 elements.
Make a properly nested from a properly nested with 9 elements.
Make a properly nested from a properly nested with 10 elements.
Make a properly nested from a properly nested with 11 elements.
Make a properly nested from a properly nested with 12 elements.
Make a properly nested from a properly nested with 13 elements.
Make a properly nested from a properly nested with 14 elements.
Make a properly nested from a properly nested with 15 elements.
Make a properly nested from a properly nested with 16 elements.
Make a properly nested from a properly nested with 17 elements.
Make a properly nested from a properly nested with 18 elements.
Make a properly nested from a properly nested with 19 elements.
Make a properly nested from a properly nested with 20 elements.
Make a properly nested from a properly nested with 21 elements.
Make a properly nested from a properly nested with 1 element.
Make a properly nested from a properly nested with 2 elements.
Make a properly nested from a properly nested with 3 elements.
Make a properly nested from a properly nested with 4 elements.
Make a properly nested from a properly nested with 5 elements.
Make a properly nested from a properly nested with 6 elements.
Make a properly nested from a properly nested with 7 elements.
Make a properly nested from a properly nested with 8 elements.
Make a properly nested from a properly nested with 9 elements.
Make a properly nested from a properly nested with 10 elements.
Make a properly nested from a properly nested with 11 elements.
Make a properly nested from a properly nested with 12 elements.
Make a properly nested from a properly nested with 13 elements.
Make a properly nested from a properly nested with 14 elements.
Make a properly nested from a properly nested with 15 elements.
Make a properly nested from a properly nested with 16 elements.
Make a properly nested from a properly nested with 17 elements.
Make a properly nested from a properly nested with 18 elements.
Make a properly nested from a properly nested with 19 elements.
Make a properly nested from a properly nested with 20 elements.
Make a properly nested from a properly nested with 21 elements.
Helper so we can call some tuple methods recursively without knowing the underlying types.
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.
Returns a value that indicates whether the current instance is equal to a specified object.
The object to compare with this instance.
if is a .
Returns a value indicating whether this instance is equal to a specified value.
An instance to compare to this instance.
true if has the same value as this instance; otherwise, false.
Compares this instance to a specified instance and returns an indication of their relative values.
An instance to compare.
A signed number indicating the relative values of this instance and .
Returns less than zero if this instance is less than , zero if this
instance is equal to , and greater than zero if this instance is greater
than .
Returns the hash code for this instance.
A 32-bit signed integer hash code.
Returns a string that represents the value of this instance.
The string representation of this instance.
The string returned by this method takes the form ().
Creates a new struct 0-tuple.
A 0-tuple.
Creates a new struct 1-tuple, or singleton.
The type of the first component of the tuple.
The value of the first component of the tuple.
A 1-tuple (singleton) whose value is (item1).
Creates a new struct 2-tuple, or pair.
The type of the first component of the tuple.
The type of the second component of the tuple.
The value of the first component of the tuple.
The value of the second component of the tuple.
A 2-tuple (pair) whose value is (item1, item2).
Creates a new struct 3-tuple, or triple.
The type of the first component of the tuple.
The type of the second component of the tuple.
The type of the third component of the tuple.
The value of the first component of the tuple.
The value of the second component of the tuple.
The value of the third component of the tuple.
A 3-tuple (triple) whose value is (item1, item2, item3).
Creates a new struct 4-tuple, or quadruple.
The type of the first component of the tuple.
The type of the second component of the tuple.
The type of the third component of the tuple.
The type of the fourth component of the tuple.
The value of the first component of the tuple.
The value of the second component of the tuple.
The value of the third component of the tuple.
The value of the fourth component of the tuple.
A 4-tuple (quadruple) whose value is (item1, item2, item3, item4).
Creates a new struct 5-tuple, or quintuple.
The type of the first component of the tuple.
The type of the second component of the tuple.
The type of the third component of the tuple.
The type of the fourth component of the tuple.
The type of the fifth component of the tuple.
The value of the first component of the tuple.
The value of the second component of the tuple.
The value of the third component of the tuple.
The value of the fourth component of the tuple.
The value of the fifth component of the tuple.
A 5-tuple (quintuple) whose value is (item1, item2, item3, item4, item5).
Creates a new struct 6-tuple, or sextuple.
The type of the first component of the tuple.
The type of the second component of the tuple.
The type of the third component of the tuple.
The type of the fourth component of the tuple.
The type of the fifth component of the tuple.
The type of the sixth component of the tuple.
The value of the first component of the tuple.
The value of the second component of the tuple.
The value of the third component of the tuple.
The value of the fourth component of the tuple.
The value of the fifth component of the tuple.
The value of the sixth component of the tuple.
A 6-tuple (sextuple) whose value is (item1, item2, item3, item4, item5, item6).
Creates a new struct 7-tuple, or septuple.
The type of the first component of the tuple.
The type of the second component of the tuple.
The type of the third component of the tuple.
The type of the fourth component of the tuple.
The type of the fifth component of the tuple.
The type of the sixth component of the tuple.
The type of the seventh component of the tuple.
The value of the first component of the tuple.
The value of the second component of the tuple.
The value of the third component of the tuple.
The value of the fourth component of the tuple.
The value of the fifth component of the tuple.
The value of the sixth component of the tuple.
The value of the seventh component of the tuple.
A 7-tuple (septuple) whose value is (item1, item2, item3, item4, item5, item6, item7).
Creates a new struct 8-tuple, or octuple.
The type of the first component of the tuple.
The type of the second component of the tuple.
The type of the third component of the tuple.
The type of the fourth component of the tuple.
The type of the fifth component of the tuple.
The type of the sixth component of the tuple.
The type of the seventh component of the tuple.
The type of the eighth component of the tuple.
The value of the first component of the tuple.
The value of the second component of the tuple.
The value of the third component of the tuple.
The value of the fourth component of the tuple.
The value of the fifth component of the tuple.
The value of the sixth component of the tuple.
The value of the seventh component of the tuple.
The value of the eighth component of the tuple.
An 8-tuple (octuple) whose value is (item1, item2, item3, item4, item5, item6, item7, item8).
Represents a 1-tuple, or singleton, as a value type.
The type of the tuple's only component.
The current instance's first component.
Initializes a new instance of the value type.
The value of the tuple's first component.
Returns a value that indicates whether the current instance is equal to a specified object.
The object to compare with this instance.
if the current instance is equal to the specified object; otherwise, .
The parameter is considered to be equal to the current instance under the following conditions:
- It is a value type.
- Its components are of the same types as those of the current instance.
- Its components are equal to those of the current instance. Equality is determined by the default object equality comparer for each component.
Returns a value that indicates whether the current
instance is equal to a specified .
The tuple to compare with this instance.
if the current instance is equal to the specified tuple; otherwise, .
The parameter is considered to be equal to the current instance if each of its field
is equal to that of the current instance, using the default comparer for that field's type.
Compares this instance to a specified instance and returns an indication of their relative values.
An instance to compare.
A signed number indicating the relative values of this instance and .
Returns less than zero if this instance is less than , zero if this
instance is equal to , and greater than zero if this instance is greater
than .
Returns the hash code for the current instance.
A 32-bit signed integer hash code.
Returns a string that represents the value of this instance.
The string representation of this instance.
The string returned by this method takes the form (Item1),
where Item1 represents the value of . If the field is ,
it is represented as .
Represents a 2-tuple, or pair, as a value type.
The type of the tuple's first component.
The type of the tuple's second component.
The current instance's first component.
The current instance's second component.
Initializes a new instance of the value type.
The value of the tuple's first component.
The value of the tuple's second component.
Returns a value that indicates whether the current instance is equal to a specified object.
The object to compare with this instance.
if the current instance is equal to the specified object; otherwise, .
The parameter is considered to be equal to the current instance under the following conditions:
- It is a value type.
- Its components are of the same types as those of the current instance.
- Its components are equal to those of the current instance. Equality is determined by the default object equality comparer for each component.
Returns a value that indicates whether the current instance is equal to a specified .
The tuple to compare with this instance.
if the current instance is equal to the specified tuple; otherwise, .
The parameter is considered to be equal to the current instance if each of its fields
are equal to that of the current instance, using the default comparer for that field's type.
Returns a value that indicates whether the current instance is equal to a specified object based on a specified comparison method.
The object to compare with this instance.
An object that defines the method to use to evaluate whether the two objects are equal.
if the current instance is equal to the specified object; otherwise, .
This member is an explicit interface member implementation. It can be used only when the
instance is cast to an interface.
The implementation is called only if other is not ,
and if it can be successfully cast (in C#) or converted (in Visual Basic) to a
whose components are of the same types as those of the current instance. The IStructuralEquatable.Equals(Object, IEqualityComparer) method
first passes the values of the objects to be compared to the
implementation. If this method call returns , the method is
called again and passed the values of the two instances.
Compares this instance to a specified instance and returns an indication of their relative values.
An instance to compare.
A signed number indicating the relative values of this instance and .
Returns less than zero if this instance is less than , zero if this
instance is equal to , and greater than zero if this instance is greater
than .
Returns the hash code for the current instance.
A 32-bit signed integer hash code.
Returns a string that represents the value of this instance.
The string representation of this instance.
The string returned by this method takes the form (Item1, Item2),
where Item1 and Item2 represent the values of the
and fields. If either field value is ,
it is represented as .
Represents a 3-tuple, or triple, as a value type.
The type of the tuple's first component.
The type of the tuple's second component.
The type of the tuple's third component.
The current instance's first component.
The current instance's second component.
The current instance's third component.
Initializes a new instance of the value type.
The value of the tuple's first component.
The value of the tuple's second component.
The value of the tuple's third component.
Returns a value that indicates whether the current instance is equal to a specified object.
The object to compare with this instance.
if the current instance is equal to the specified object; otherwise, .
The parameter is considered to be equal to the current instance under the following conditions:
- It is a value type.
- Its components are of the same types as those of the current instance.
- Its components are equal to those of the current instance. Equality is determined by the default object equality comparer for each component.
Returns a value that indicates whether the current
instance is equal to a specified .
The tuple to compare with this instance.
if the current instance is equal to the specified tuple; otherwise, .
The parameter is considered to be equal to the current instance if each of its fields
are equal to that of the current instance, using the default comparer for that field's type.
Compares this instance to a specified instance and returns an indication of their relative values.
An instance to compare.
A signed number indicating the relative values of this instance and .
Returns less than zero if this instance is less than , zero if this
instance is equal to , and greater than zero if this instance is greater
than .
Returns the hash code for the current instance.
A 32-bit signed integer hash code.
Returns a string that represents the value of this instance.
The string representation of this instance.
The string returned by this method takes the form (Item1, Item2, Item3).
If any field value is , it is represented as .
Represents a 4-tuple, or quadruple, as a value type.
The type of the tuple's first component.
The type of the tuple's second component.
The type of the tuple's third component.
The type of the tuple's fourth component.
The current instance's first component.
The current instance's second component.
The current instance's third component.
The current instance's fourth component.
Initializes a new instance of the value type.
The value of the tuple's first component.
The value of the tuple's second component.
The value of the tuple's third component.
The value of the tuple's fourth component.
Returns a value that indicates whether the current instance is equal to a specified object.
The object to compare with this instance.
if the current instance is equal to the specified object; otherwise, .
The parameter is considered to be equal to the current instance under the following conditions:
- It is a value type.
- Its components are of the same types as those of the current instance.
- Its components are equal to those of the current instance. Equality is determined by the default object equality comparer for each component.
Returns a value that indicates whether the current
instance is equal to a specified .
The tuple to compare with this instance.
if the current instance is equal to the specified tuple; otherwise, .
The parameter is considered to be equal to the current instance if each of its fields
are equal to that of the current instance, using the default comparer for that field's type.
Compares this instance to a specified instance and returns an indication of their relative values.
An instance to compare.
A signed number indicating the relative values of this instance and .
Returns less than zero if this instance is less than , zero if this
instance is equal to , and greater than zero if this instance is greater
than .
Returns the hash code for the current instance.
A 32-bit signed integer hash code.
Returns a string that represents the value of this instance.
The string representation of this instance.
The string returned by this method takes the form (Item1, Item2, Item3, Item4).
If any field value is , it is represented as .
Represents a 5-tuple, or quintuple, as a value type.
The type of the tuple's first component.
The type of the tuple's second component.
The type of the tuple's third component.
The type of the tuple's fourth component.
The type of the tuple's fifth component.
The current instance's first component.
The current instance's second component.
The current instance's third component.
The current instance's fourth component.
The current instance's fifth component.
Initializes a new instance of the value type.
The value of the tuple's first component.
The value of the tuple's second component.
The value of the tuple's third component.
The value of the tuple's fourth component.
The value of the tuple's fifth component.
Returns a value that indicates whether the current instance is equal to a specified object.
The object to compare with this instance.
if the current instance is equal to the specified object; otherwise, .
The parameter is considered to be equal to the current instance under the following conditions:
- It is a value type.
- Its components are of the same types as those of the current instance.
- Its components are equal to those of the current instance. Equality is determined by the default object equality comparer for each component.
Returns a value that indicates whether the current
instance is equal to a specified .
The tuple to compare with this instance.
if the current instance is equal to the specified tuple; otherwise, .
The parameter is considered to be equal to the current instance if each of its fields
are equal to that of the current instance, using the default comparer for that field's type.
Compares this instance to a specified instance and returns an indication of their relative values.
An instance to compare.
A signed number indicating the relative values of this instance and .
Returns less than zero if this instance is less than , zero if this
instance is equal to , and greater than zero if this instance is greater
than .
Returns the hash code for the current instance.
A 32-bit signed integer hash code.
Returns a string that represents the value of this instance.
The string representation of this instance.
The string returned by this method takes the form (Item1, Item2, Item3, Item4, Item5).
If any field value is , it is represented as .
Represents a 6-tuple, or sixtuple, as a value type.
The type of the tuple's first component.
The type of the tuple's second component.
The type of the tuple's third component.
The type of the tuple's fourth component.
The type of the tuple's fifth component.
The type of the tuple's sixth component.
The current instance's first component.
The current instance's second component.
The current instance's third component.
The current instance's fourth component.
The current instance's fifth component.
The current instance's sixth component.
Initializes a new instance of the value type.
The value of the tuple's first component.
The value of the tuple's second component.
The value of the tuple's third component.
The value of the tuple's fourth component.
The value of the tuple's fifth component.
The value of the tuple's sixth component.
Returns a value that indicates whether the current instance is equal to a specified object.
The object to compare with this instance.
if the current instance is equal to the specified object; otherwise, .
The parameter is considered to be equal to the current instance under the following conditions:
- It is a value type.
- Its components are of the same types as those of the current instance.
- Its components are equal to those of the current instance. Equality is determined by the default object equality comparer for each component.
Returns a value that indicates whether the current
instance is equal to a specified .
The tuple to compare with this instance.
if the current instance is equal to the specified tuple; otherwise, .
The parameter is considered to be equal to the current instance if each of its fields
are equal to that of the current instance, using the default comparer for that field's type.
Compares this instance to a specified instance and returns an indication of their relative values.
An instance to compare.
A signed number indicating the relative values of this instance and .
Returns less than zero if this instance is less than , zero if this
instance is equal to , and greater than zero if this instance is greater
than .
Returns the hash code for the current instance.
A 32-bit signed integer hash code.
Returns a string that represents the value of this instance.
The string representation of this instance.
The string returned by this method takes the form (Item1, Item2, Item3, Item4, Item5, Item6).
If any field value is , it is represented as .
Represents a 7-tuple, or sentuple, as a value type.
The type of the tuple's first component.
The type of the tuple's second component.
The type of the tuple's third component.
The type of the tuple's fourth component.
The type of the tuple's fifth component.
The type of the tuple's sixth component.
The type of the tuple's seventh component.
The current instance's first component.
The current instance's second component.
The current instance's third component.
The current instance's fourth component.
The current instance's fifth component.
The current instance's sixth component.
The current instance's seventh component.
Initializes a new instance of the value type.
The value of the tuple's first component.
The value of the tuple's second component.
The value of the tuple's third component.
The value of the tuple's fourth component.
The value of the tuple's fifth component.
The value of the tuple's sixth component.
The value of the tuple's seventh component.
Returns a value that indicates whether the current instance is equal to a specified object.
The object to compare with this instance.
if the current instance is equal to the specified object; otherwise, .
The parameter is considered to be equal to the current instance under the following conditions:
- It is a value type.
- Its components are of the same types as those of the current instance.
- Its components are equal to those of the current instance. Equality is determined by the default object equality comparer for each component.
Returns a value that indicates whether the current
instance is equal to a specified .
The tuple to compare with this instance.
if the current instance is equal to the specified tuple; otherwise, .
The parameter is considered to be equal to the current instance if each of its fields
are equal to that of the current instance, using the default comparer for that field's type.
Compares this instance to a specified instance and returns an indication of their relative values.
An instance to compare.
A signed number indicating the relative values of this instance and .
Returns less than zero if this instance is less than , zero if this
instance is equal to , and greater than zero if this instance is greater
than .
Returns the hash code for the current instance.
A 32-bit signed integer hash code.
Returns a string that represents the value of this instance.
The string representation of this instance.
The string returned by this method takes the form (Item1, Item2, Item3, Item4, Item5, Item6, Item7).
If any field value is , it is represented as .
Represents an 8-tuple, or octuple, as a value type.
The type of the tuple's first component.
The type of the tuple's second component.
The type of the tuple's third component.
The type of the tuple's fourth component.
The type of the tuple's fifth component.
The type of the tuple's sixth component.
The type of the tuple's seventh component.
The type of the tuple's eighth component.
The current instance's first component.
The current instance's second component.
The current instance's third component.
The current instance's fourth component.
The current instance's fifth component.
The current instance's sixth component.
The current instance's seventh component.
The current instance's eighth component.
Initializes a new instance of the value type.
The value of the tuple's first component.
The value of the tuple's second component.
The value of the tuple's third component.
The value of the tuple's fourth component.
The value of the tuple's fifth component.
The value of the tuple's sixth component.
The value of the tuple's seventh component.
The value of the tuple's eight component.
Returns a value that indicates whether the current instance is equal to a specified object.
The object to compare with this instance.
if the current instance is equal to the specified object; otherwise, .
The parameter is considered to be equal to the current instance under the following conditions:
- It is a value type.
- Its components are of the same types as those of the current instance.
- Its components are equal to those of the current instance. Equality is determined by the default object equality comparer for each component.
Returns a value that indicates whether the current
instance is equal to a specified .
The tuple to compare with this instance.
if the current instance is equal to the specified tuple; otherwise, .
The parameter is considered to be equal to the current instance if each of its fields
are equal to that of the current instance, using the default comparer for that field's type.
Compares this instance to a specified instance and returns an indication of their relative values.
An instance to compare.
A signed number indicating the relative values of this instance and .
Returns less than zero if this instance is less than , zero if this
instance is equal to , and greater than zero if this instance is greater
than .
Returns the hash code for the current instance.
A 32-bit signed integer hash code.
Returns a string that represents the value of this instance.
The string representation of this instance.
The string returned by this method takes the form (Item1, Item2, Item3, Item4, Item5, Item6, Item7, Rest).
If any field value is , it is represented as .