initialize list of strings c# code example
Example 1: c# list string initialize inline
List<string> games = new List<string>() { "Doom", "Tetris", "City of Heroes" }
Example 2: instantiate list with values c#
var list = new List<string> {
"test1",
"test2",
"test3"
};
Example 3: initialize list in c#
List<string> optionList = new List<string>
{ "AdditionalCardPersonAdressType", /* rest of elements */ };