I want to set a variable to a default value if the assignment returns null or something else.
string a = GetValue();
if GetValue returns null, then I want to have a default value for variable a, how to do that in c#. Try not using if.
Thanks for the time.
Use the null coalescing operator.