# Double.IsNaN(Double) メソッド

## 定義

``````public:
static bool IsNaN(double d);``````
``public static bool IsNaN (double d);``
``static member IsNaN : double -> bool``
``Public Shared Function IsNaN (d As Double) As Boolean``

d
Double

#### 戻り値

Boolean

`d`NaN と評価される場合は `true`。それ以外の場合は `false``true` if `d` evaluates to NaN; otherwise, `false`.

## 例

``````// This will return true.
if ( Double::IsNaN( 0 / zero ) )
{
Console::WriteLine( "Double::IsNan() can determine whether a value is not-a-number." );
}
``````
``````// This will return true.
if (Double.IsNaN(0 / zero))
Console.WriteLine("Double.IsNan() can determine whether a value is not-a-number.");
``````
``````' This will return true.
If Double.IsNaN(0 / zero) Then
Console.WriteLine("Double.IsNan() can determine whether a value is not-a-number.")
End If
``````

## 注釈

IsNaN`false`値がまたはの場合はを返し Double PositiveInfinity NegativeInfinity ます。IsNaN returns `false` if a Double value is either PositiveInfinity or NegativeInfinity. これらの値をテストするには、、、およびの各メソッドを使用し IsInfinity IsPositiveInfinity IsNegativeInfinity ます。To test for these values, use the IsInfinity, IsPositiveInfinity, and IsNegativeInfinity methods.