Benny Sutton is 4 hire - just click here

Null handling Doubles

Check if an expected double is null or a passed in value.

           
        public static bool IsNullOrValue(this double? value, double valueToCheck)
        {
            return (value ?? valueToCheck) == valueToCheck;
        }
 
    

call like this...

         
         double dbl = dblToTest.IsNullOrValue();