logoalt Hacker News

gus_massayesterday at 11:20 PM2 repliesview on HN

From the article:

> If config?.Settings is null, the assignment is skipped.

If the right hand expression has side effects, are they run? I guess they do, and that would make the code more predictable.


Replies

Izikiel43today at 1:00 AM

From the article as well:

Side-Effect Prevention When a null-conditional statement assignment is evaluated, the right-hand side of the expression is not executed unless the left-hand side is defined.

show 1 reply