Ran across this line of code:
FormsAuth = formsAuth ?? new FormsAuthenticationWrapper();
What do the two question marks mean, is it some ki
The ??
operator is called the null-coalescing operator. It returns the left-hand operand if the operand is not null; otherwise it returns the right hand operand.
int? variable1 = null;
int variable2 = variable1 ?? 100;
Set variable2
to the value of variable1
, if variable1
is NOT null;
otherwise, if variable1 == null
, set variable2
to 100.