Skip to content

Instantly share code, notes, and snippets.

@daniel-white
Created July 5, 2017 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daniel-white/8192a95b7019e61d226f1eb3f4b37ac7 to your computer and use it in GitHub Desktop.
Save daniel-white/8192a95b7019e61d226f1eb3f4b37ac7 to your computer and use it in GitHub Desktop.
Which style
// Dot operator
// DAW: I normally do this
obj
.SomeReallyLongThing1()
.SomeReallyLongThing2();
// Null conditional operator
// DAW: should the question mark be with the dot or the previous line
// #1
obj?
.SomeReallyLongThing1()?
.SomeReallyLongThing2();
// #2
obj
?.SomeReallyLongThing1()
?.SomeReallyLongThing2();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment