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.

Revisions

  1. jpitchardu created this gist May 23, 2018.
    3 changes: 3 additions & 0 deletions null-coalescence.cs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    SomeClass obj;

    obj?.prop1?.prop2?.prop3 ?? "SomeDefaultValue";