How exactly is null conditional operator expaned in C# 6? Could someone explain it as it is Curious C# using statement expansion expanded in the question?
The description from MSDN is as follows:
If one operation in a chain of conditional member access and index operation returns null, then the rest of the chain’s execution stops.
Few working examples:
a) int count = aClassInstance?.PropertyCollection?.Count ?? 0;
b) if (aClassInstance?.PropertyCollection?.Count > 0)
c) aClassInstance?.Dispose();
d) if (aClassInstance?.PropertyCollection?[0]?.Foo == "bar")