April 2018
Intermediate to advanced
300 pages
7h 41m
English
Tuples solve the problem of returning more than one value from a method. Traditionally, we can use out variables that are reference variables, and the value is changed if they are modified from the calling method. However, without parameters, there are some limitations, such as that it cannot be used with async methods and is not recommended to be used with external services.
Tuples have the following characteristics:
A Tuple is represented as System.Tuple<T>, where T could be any type. The following example shows how a Tuple can be used with the method and how the values can be invoked:
static void Main(string[] args) { var person ...Read now
Unlock full access