Ran across this line of code:
FormsAuth = formsAuth ?? new FormsAuthenticationWrapper();
What do the two question marks mean, is it some ki
Some of the examples here of getting values using coalescing are inefficient.
What you really want is:
return _formsAuthWrapper = _formsAuthWrapper ?? new FormsAuthenticationWrapper();
or
return _formsAuthWrapper ?? (_formsAuthWrapper = new FormsAuthenticationWrapper());
This prevents the object from being recreated every time. Instead of the private variable remaining null and a new object getting created on every request, this ensures the private variable is assigned if the new object is created.