Single.NegativeInfinity 欄位

定義

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

public: float NegativeInfinity = -Infinity;
public const float NegativeInfinity = -Infinity;
val mutable NegativeInfinity : single
Public Const NegativeInfinity As Single  = -Infinity

欄位值

Value = -Infinity

範例

下列程式碼範例示範 NegativeInfinity 常數。

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

備註

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

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

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

適用於

另請參閱