I\'m looking for a quick way to create a list of values in C#. In Java I frequently use the snippet below:
List l = Arrays.asList(\"test1\",\"test2
You can create helper generic, static method to create list:
internal static class List { public static List Of(params T[] args) { return new List(args); } }
And then usage is very compact:
List.Of("test1", "test2", "test3")