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)

public const double NaN

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.

Show: