Mono Class Library: System.Single Overview | Members

System.Single.IsNaN Method

Determines whether the value of the specified float is undefined (Not-a-Number).

[System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)]
public static bool IsNaN (float f)

Parameters

f
The float to be checked.

Returns

true if f represents a NaN value; otherwise false.

Remarks

Note: Floating-point operations return NaN values to signal that the result of the operation is undefined. For example, dividing (Single) 0.0 by 0.0 results in a NaN value.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0