isnull or zero c# code example
Example 1: c# check that value is not null or 0
public static bool IsNullOrValue(this double? value, double valueToCheck)
{
return (value??valueToCheck) == valueToCheck;
}
Example 2: int if null put zero c#
var number = null;
int result = number.GetValueOrDefault();