I have got an integer value and i need to check if it is NULL or not. I got it using a null-coalescing operator
C#:
public int? Age;
if ((Age ?? 0)==0)
{
// do somethig
}
Now i have to check in a older application where the declaration part is not in ternary. So, how to achieve this without the null-coalescing operator.
??a null-coalescing operator.SomeValueType?is a nullable type.int?is not "an integer value". An "integer value" is never null, so the answer is simple: "it isn't". What you have is aNullable<int>, orint?or just "a nullable int".