var tupleList = new List<Tuple<int, string, string, string>>();
tupleList.Add(Tuple.Create(1, "Sefat Anam", "Dhaka Bangladesh", "0.1245345"));
//You can define tuples with an arbitrary large number of elements:
var t =
(1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18,
19, 20, 21, 22, 23, 24, 25, 26);
Console.WriteLine(t.Item26); // output: 26
//You can explicitly specify the names of tuple fields either in a
//tuple initialization expression or in the definition of a tuple
//type, as the following example shows:
var t = (Sum: 4.5, Count: 3);
Console.WriteLine($"Sum of {t.Count} elements is {t.Sum}.");
(double Sum, int Count) d = (4.5, 3);
Console.WriteLine($"Sum of {d.Count} elements is {d.Sum}.");
public class Program
{
static void Main(string[] args)
{
var test = new Tuple<int, int> ( 10,11);
Console.WriteLine(test.Item1);
Console.WriteLine(test.Item2);
var hugeTuble = Tuple.Create(1,2,3,4,5,6,7,(1,2,3,4,5,6,7,8));
Console.ReadLine();
}
}