Join Slack
Powered by
who on earth thought making the safe-call operator...
# random
k
kirillrakhman
07/25/2016, 1:14 PM
who on earth thought making the safe-call operator in C# (for the lack of a better name) "lazy" was a good idea. in
foo?.bar.baz
,
bar.baz
won't even be evaluated if
foo
was null. However, you'll get a NPE if you instead write
(foo?.bar).baz
🙄.
Open in Slack
Previous
Next