CSharp examples for Language Basics:Tuple
Inferred Tuple Element Names
using System;//from w w w. j av a 2 s.c o m using System.Collections.Generic; using System.Linq; class InferredTupleElementNames { static void Main() { List<int> list = new List<int> { 5, 1, -6, 2 }; var tuple = (list.Count, Min: list.Min(), Max: list.Max()); Console.WriteLine(tuple.Count); Console.WriteLine(tuple.Min); Console.WriteLine(tuple.Max); } }