Nullable Assignment¶
Nullable assignment operator (??=
) can be used assign value if the variable is null
.
Syntax
variable ??= expr
Example
a ??= "Hello"
b ??= 1
Nullable assignment operator (??=
) can be used assign value if the variable is null
.
variable ??= expr
a ??= "Hello"
b ??= 1