Exemplo n.º 1
0
 public static void ValidateSingle(float value)
 {
     if (!float.IsFinite(value))
     {
         ThrowHelper.ThrowArgumentException_ValueNotSupported();
     }
 }
Exemplo n.º 2
0
 public static void ValidateDouble(double value)
 {
     if (!double.IsFinite(value))
     {
         ThrowHelper.ThrowArgumentException_ValueNotSupported();
     }
 }
Exemplo n.º 3
0
        public static void ValidateSingle(float value)
        {
#if BUILDING_INBOX_LIBRARY
            if (!float.IsFinite(value))
#else
            if (float.IsNaN(value) || float.IsInfinity(value))
#endif
            {
                ThrowHelper.ThrowArgumentException_ValueNotSupported();
            }
        }
Exemplo n.º 4
0
        public static void ValidateDouble(double value)
        {
#if BUILDING_INBOX_LIBRARY
            if (!double.IsFinite(value))
#else
            if (double.IsNaN(value) || double.IsInfinity(value))
#endif
            {
                ThrowHelper.ThrowArgumentException_ValueNotSupported();
            }
        }