Share via


NaN Field

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Represents a value that is not a number (NaN). This field is constant.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Const NaN As Double
public const double NaN
public:
literal double NaN
static val mutable NaN: float
public const var NaN : double

Remarks

A method or operator returns NaN when the result of an operation is undefined.

In addition, a method call with a NaN value or an operation on a NaN value returns NaN.

Use the IsNaN method to determine whether a value is not a number. Two NaN values are considered unequal to one another. Therefore, it is not possible to determine whether a value is not a number by using the equality operator to compare it to another value that is equal to NaN. The comparison returns false.

.NET Framework Security

See Also

Reference

Double Structure

System Namespace