I just submitted a suggestion to add an operator to C#. I kept the sample on the suggestion simple, but I'm really trying to enable a scenario like this:
1: public class SomeClass
2: { 3: private List<string> _Strings = null;
4:
5: public List<string> Strings
6: { 7: get { return _Strings ?= new List<string>(); } 8: }
9: }
In this sample if _Strings was null, it would create a new list of strings, assign it to the _Strings variable, and return the newly created list from the getter. However, if _Strings was not null, the getter would simple return the list referenced by the _Strings variable.
If you like this idea, go ahead and vote on it!