C# Double NegativeInfinity

Description

Double NegativeInfinity represents negative infinity. This field is constant.

Syntax

Double.NegativeInfinity has the following syntax.


public const double NegativeInfinity

Example

The following code example illustrates the use of NegativeInfinity:


using System;/*w w w  .j av a2  s.c  o m*/

public class MainClass{
  public static void Main(String[] argv){  
    // This will equal Infinity.
    Console.WriteLine("10.0 minus NegativeInfinity equals {0}.", 
                      (10.0 - Double.NegativeInfinity).ToString());

  }
}

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