# Single.IsNaN(Single)Single.IsNaN(Single)Single.IsNaN(Single)Single.IsNaN(Single) Method

## 定義

``````public:
static bool IsNaN(float f);``````
``public static bool IsNaN (float f);``
``static member IsNaN : single -> bool``
``Public Shared Function IsNaN (f As Single) As Boolean``

#### パラメーター

f
Single Single Single Single

#### 戻り値

`f` が非数 (NaN) と評価される場合は `true`。それ以外の場合は `false``true` if `f` evaluates to not a number (NaN); otherwise, `false`.

## 例

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

## 注釈

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