| Start |
|---|
| Accessing tuple elements To access tuple elements use |
| Creating tuples Tuples are created using generic types Tuples can also be created using static Since C# 7.0, Tuples can be easily created using ValueTuple (opens new window). Elements can be named for easier decomposition. |
| Comparing and sorting Tuples Tuples can be compared based on their elements. As an example, an enumerable whose elements are of type Or to reverse the sort use: |
| Return multiple values from a method Tuples can be used to return multiple values from a method without using out parameters. In the following example Output: 53 Now C# 7.0 offers an alternative way to return multiple values from methods using value tuples More info about |
Read Article
https://develop.horje.com/learn/1434/reference