Export (0) Print
Expand All

Double.NegativeInfinity Field

Represents negative infinity. This field is constant.

[Visual Basic]
Public Const NegativeInfinity As Double
[C#]
public const double NegativeInfinity;
[C++]
public: const double NegativeInfinity;
[JScript]
public var NegativeInfinity : double;

Remarks

The value of this constant is the result of dividing a negative number by zero.

This constant is returned when the result of an operation is less than MinValue.

Use IsNegativeInfinity to determine whether a value evaluates to negative infinity. It is not possible to determine whether a value evaluates to negative infinity by comparing it to another value equal to NegativeInfinity.

Example

[Visual Basic, C#, C++] The following code sample illustrates the use of NegativeInfinity:

[Visual Basic] 
' This will equal Infinity.
Console.WriteLine("10.0 minus NegativeInfinity equals " + (10 - Double.NegativeInfinity).ToString() + ".")

[C#] 
// This will equal Infinity.
Console.WriteLine("10.0 minus NegativeInfinity equals {0}.", (10.0 - Double.NegativeInfinity).ToString());

[C++] 
// This will equal Infinity.
Console::WriteLine(S"10.0 minus NegativeInfinity equals {0}.", __box((10.0 - Double::NegativeInfinity)));

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

Double Structure | Double Members | System Namespace | IsNegativeInfinity | IsInfinity | PositiveInfinity

Show:
© 2014 Microsoft