The null conditional operator can be used to skip method calls on a null target. Would the method arguments be evaluated or not in that case?
For example:
myObject?.DoSomething(GetFromNetwork());
Is GetFromNetwork
called when myObject
is null
?
object
only once, the latter twice if non-null
. Since they're not equivalent, no conclusions should be drawn from it. – Norikonorina