I need to initialize a bunch of lists and populate them with lots of values during initialization, but csc 2.0 compiler that i have to use doesn't like it. For example:
List<int> ints = new List<int>() { 1, 2, 3 };
will produce the following compiler error:
error CS1002: ; expected
Is there a way to initialize a list that will make csc 2.0 compiler happy without doing something ugly like this:
List<int> ints = new List<int>();
ints.Add(1);
ints.Add(2);
ints.Add(3);