As far as I can see .NET does not like the assignment inside the statement, so "return listOfInts ?? new List<int>;" would work in terms of returning a new List but would of course fail to initialize the listOfInts variable.
What you can do if you want to avoid the long replacement block, is to put brackets around the assignment: "return listOfInts ?? (listOfInts=new List<int>);", I believe this should work.
The ?? operator is a feature from C# 2.0 called the "null coalescing operator", you can read more about it here: http:// msdn.microsoft. com/en- us/library/ ms173224. aspx
As far as I can see .NET does not like the assignment inside the statement, so "return listOfInts ?? new List<int>;" would work in terms of returning a new List but would of course fail to initialize the listOfInts variable.
What you can do if you want to avoid the long replacement block, is to put brackets around the assignment: "return listOfInts ?? (listOfInts=new List<int>);", I believe this should work.
/Brian