Double.NegativeInfinity 欄位

定義

表示負無限大。Represents negative infinity. 這個欄位是常數。This field is constant.

public: double NegativeInfinity = -Infinity;
public const double NegativeInfinity = -Infinity;
val mutable NegativeInfinity : double
Public Const NegativeInfinity As Double  = -Infinity

欄位值

範例

下列程式碼範例說明如何使用 NegativeInfinityThe following code example illustrates the use of NegativeInfinity:

// This will equal Infinity.
Console::WriteLine( "10.0 minus NegativeInfinity equals {0}.", (10.0 - Double::NegativeInfinity) );
// This will equal Infinity.
Console.WriteLine("10.0 minus NegativeInfinity equals {0}.", (10.0 - Double.NegativeInfinity).ToString());
' This will equal Infinity.
Console.WriteLine("10.0 minus NegativeInfinity equals " + (10 - Double.NegativeInfinity).ToString() + ".")

備註

這個常數的值是負數位除以零的結果。The value of this constant is the result of dividing a negative number by zero.

當運算的結果小於 Double.MinValue時,就會傳回這個常數。This constant is returned when the result of an operation is less than Double.MinValue.

使用 IsNegativeInfinity 來判斷值是否評估為負無限大。Use IsNegativeInfinity to determine whether a value evaluates to negative infinity.

適用於

另請參閱