How can I add items to named Tuple

Viewed 715

I have the following named list of Tuple

var tupleList = new List<(string SureName, string LastName, int Age)>();

How can I add items to that list using tupleList.Add ?

2 Answers
var tupleList = new List<(string SureName, string LastName, int Age)>();
tupleList.Add(("a", "b", 3));

enter image description here

As you can see it demanded an item at the end of add, which seems to be optional and the reason for the double brackets.

var tupleList = new List<Tuple<string, string, int>>();
tupleList.Add(new Tuple<string, string, int>("Nicolas", "Smith", 32));
Related