ValueTuple is a structure introduced in C# 7.0 which represents the value type Tuple. It allows you to store a data set which contains multiple values that may or may not be related to each other. As we know that Item<ElementNumber> property is used to get the elements present in the value tuples, but this property works only for seven elements. If you want to get the remaining elements, then you must go for Rest property.
The Rest property allows you to get the remaining element of the value tuple other than the starting seven elements. Or you can say it is used for accessing the elements of the nested value tuple.
public TRest Rest;
Here, TRest is the field value of a ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest> structure.
C# Topics: Methods Method Hiding Optional Parameters Anonymous Method Partial Methods Local Function Delegates (Destructors)
Employee Details: Id: 23456 Name: Anu Branch: CSE DOB: 14-4-1992 Age: 27 Passing Year: 2010 Phone Number: 3456781234 Programming Language: ((Java, C#))
- C# Decision Making (if, if-else, if-else-if ladder, nested if, switch, nested switch)
- ValueTuple in C#
- How to create 6-ValueTuple in C#?
- C# | ValueTuple <T1> Struct
- How to create 7-ValueTuple in C#?
- ValueTuple Struct in C#
- How to get Second Element of the ValueTuple in C#?
- How to get fifth Element of the ValueTuple in C#?
- C# | ValueTuple <T1,T2,T3,T4,T5,T6,T7> Struct
- How to get First Element of the ValueTuple in C#?
- How to get third Element of the ValueTuple in C#?
- How to compare two ValueTuple in C#?
- How to create 8-ValueTuple in C#?
- C# | ValueTuple <T1,T2,T3,T4,T5,T6> Struct
- How to create 2-ValueTuple in C#?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.