Categories

Oct 18, 2019 in C Sharp (C#)

Q: Why to use “Nullable Coalescing Operator” (??) in C#?

1 Answer

Oct 18, 2019
Nullable Coalescing Operator can be used with reference types and nullable value types. So if the first operand of the expression is null then the value of second operand is assigned to the variable. For example,

double? myFirstno = null;

double mySecno;

mySecno = myFirstno ?? 10.11;
Click here to read more about C Sharp
Click here to read more about Insurance

Related questions

Madanswer
Oct 18, 2019 in C Sharp (C#)
Feb 16 in C Sharp (C#)
Jun 16 in C Sharp (C#)
...