I am writing my testcode and I do not want wo write:
List nameslist = new List(); nameslist.Add(\"one\"); nameslist.Add(\"two\"); nam
var list = new List { "One", "Two", "Three" };
Essentially the syntax is:
new List { Instance1, Instance2, Instance3 };
Which is translated by the compiler as
List list = new List(); list.Add("One"); list.Add("Two"); list.Add("Three");