I am trying to initialize a generic collection List something like this:
List<MyCustomClass> myCustomClassList = new List<MyCustomClass>() {myCustomClassInstance1, myCustomClassInstance2};
I am getting the compile error "; expected". I don't understand this. Shouldn't I just be able to initialize this collection like this?