We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

SirGouki • 7 months ago

The explanation of what this is doing does NOT match what it actually does: ?? returns the value on the right if the variable on the left is null, else it returns the value of the variable on the left.

The explanation given is more accurate for the ??= operator.

See https://docs.microsoft.com/...

Funnily enough, the comment provided is a better explanation than the description.

Peglo • 5 months ago

Sorry English is not my first language, how should I phrase the description?

Scubamandan • 1 year ago

Cool. So it's essentially a coalesce, such as in TSQL.

SirGouki • 7 months ago

It is referred to in the official C# documentation as a null coalescing operator, so yes.