System.Single.IsInfinity Method

Returns a value indicating whether the specified number evaluates to negative or positive infinity.

Syntax

public static bool IsInfinity (float f)

Parameters

f
A single-precision floating-point number.

Returns

true if f evaluates to float.PositiveInfinity or float.NegativeInfinity; otherwise, false.

Remarks

Floating-point operations return float.PositiveInfinity or float.NegativeInfinity to signal an overflow condition.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0