C# Double IsNegativeInfinity

Description

Double IsNegativeInfinity returns a value indicating whether the specified number evaluates to negative infinity.

Syntax

Double.IsNegativeInfinity has the following syntax.


public static bool IsNegativeInfinity(
  double d
)

Parameters

Double.IsNegativeInfinity has the following parameters.

  • d - A double-precision floating-point number.

Returns

Double.IsNegativeInfinity method returns true if d evaluates to NegativeInfinity; otherwise, false.

Example

The following code example illustrates the use of IsNegativeInfinity:


using System;/*w  w w  .  j a v  a 2s. c o  m*/

public class MainClass{
  public static void Main(String[] argv){  
    // This will return "true".
    Console.WriteLine(Double.IsNegativeInfinity(-5.0 / 0));
  }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version