18
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
var numbers = Tuple.Create(1, 2, Tuple.Create(3, 4, 5, 6, 7, 8), 9, 10, 11, 12, 13 );
8
9
Console.WriteLine(numbers.Item1); // returns 1
10
Console.WriteLine(numbers.Item2); // returns 2
11
Console.WriteLine(numbers.Item3); // returns (3, 4, 5, 6, 7, 8)
12
Console.WriteLine(numbers.Item3.Item1); // returns 3
13
Console.WriteLine(numbers.Item4); // returns 9
14
Console.WriteLine(numbers.Rest.Item1); //returns 13
15
16
17
}
18
}
Cached Result
Started on: Main thread, id: 344
Continuation #1 on: Main thread, id: 344
Press [return]
Continuation #2 on: Thread pool, id: 334
>
Continuation #1 on: Main thread, id: 344
Press [return]
Continuation #2 on: Thread pool, id: 334