List<String> strings = new in c# and java code example
Example 1: c# how to set string list
// This will create a new list called 'nameOfList':
var nameOfList = new List<string>
{
"value1",
"value2",
"value3"
};
Example 2: make a list c#
IList<int> newList = new List<int>(){1,2,3,4};