Single.NegativeInfinity 欄位

定義

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

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

欄位值

範例

下列程式碼範例會示範 NegativeInfinity 常數。The following code example demonstrates the NegativeInfinity constant.

// 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.
Console.WriteLine("10.0 minus NegativeInfinity equals " + (10 - Single.NegativeInfinity).ToString() + ".")

備註

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

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

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

適用於

另請參閱