共用方式為


Double.NegativeInfinity 欄位

定義

表示負無限大。 這個欄位為常數。

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

欄位值

Value = -Infinity

範例

下列程式碼範例說明 如何使用 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.
printfn $"10.0 minus NegativeInfinity equals {10.0 - Double.NegativeInfinity}."
' This will equal Infinity.
Console.WriteLine("10.0 minus NegativeInfinity equals " + (10 - Double.NegativeInfinity).ToString() + ".")

備註

這個常數的值是將負數除以零的結果。

當作業的結果小於 Double.MinValue 時,會傳回這個常數。

使用 IsNegativeInfinity 來判斷值是否評估為負無限大。

適用於

另請參閱