Single.IsNegativeInfinity Method

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

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

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

Syntax

Public Shared Function IsNegativeInfinity ( _
    f As Single _
) As Boolean
public static bool IsNegativeInfinity(
    float f
)

Parameters

Return Value

Type: System..::.Boolean
true if f evaluates to NegativeInfinity; otherwise, false.

Remarks

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

Examples

The following code example demonstrates the IsNegativeInfinity method.

' This will return True.
outputBlock.Text &= "IsNegativeInfinity(-5.0 / 0) = "
If Single.IsNegativeInfinity(-5 / 0) Then
   outputBlock.Text &= "True." & vbCrLf
Else
   outputBlock.Text &= "False." & vbCrLf
End If
// This will return true.
outputBlock.Text += String.Format("IsNegativeInfinity(-5.0F / 0) == {0}.", Single.IsNegativeInfinity(-5.0F / 0) ? "true" : "false") + "\n";

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

See Also

Reference

Single Structure

System Namespace

IsInfinity

IsPositiveInfinity

PositiveInfinity

NegativeInfinity