Skip to content

Instantly share code, notes, and snippets.

@jpitchardu
Created May 23, 2018 16:29
Show Gist options
  • Save jpitchardu/c948e181a2c88074c3ebdfdc62181681 to your computer and use it in GitHub Desktop.
Save jpitchardu/c948e181a2c88074c3ebdfdc62181681 to your computer and use it in GitHub Desktop.
Null Coalescence in C#
SomeClass obj;
obj?.prop1?.prop2?.prop3 ?? "SomeDefaultValue";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment