The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Double.NaN Field

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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

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

Public Const NaN As Double

The value of this constant is the result of dividing zero by zero.

This constant is returned when the result of an operation is undefined.

Use IsNaN to determine whether a value is not a number. It is not possible to determine whether a value is not a number by comparing it to another value equal to NaN.

The following example illustrates the use of NaN:

Dim zero As Double = 0

' This condition will return false.
If (0 / zero) = Double.NaN Then
   outputBlock.Text &= "0 / 0 can be tested with Double.NaN." & vbCrLf
   outputBlock.Text &= "0 / 0 cannot be tested with Double.NaN; use Double.IsNan() instead." & vbCrLf
End If

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone