The draft spec for Pattern Matching in C# contains the following code example:
Type? v = x?.y?.z;
if (v.HasValue) {
var value = v.GetValueOrDefault();
// code using value
}
I understand that Type?
indicates that Type
is nullable, but assuming x
, y
, and z
are locals, what does x?.y?.z
mean?