CSharp examples for Language Basics:Tuple
Tuple Element Access
using System;//from w ww . ja v a 2 s . c o m class ElementAccess { static void Main() { var tuple = (x: 5, 10); Console.WriteLine(tuple.x); Console.WriteLine(tuple.Item1); Console.WriteLine(tuple.Item2); tuple.x = 100; Console.WriteLine(tuple.Item1); // Prints 100 } }