Single.PositiveInfinity 欄位

定義

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

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

欄位值

範例

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

// This will equal Infinity.
Console::WriteLine( "PositiveInfinity plus 10.0 equals {0}.", (Single::PositiveInfinity + 10.0) );
// This will equal Infinity.
Console.WriteLine("PositiveInfinity plus 10.0 equals {0}.", (Single.PositiveInfinity + 10.0).ToString());
' This will equal Infinity.
Console.WriteLine("PositiveInfinity plus 10.0 equals " + (Single.PositiveInfinity + 10).ToString() + ".")

備註

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

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

IsPositiveInfinity來判斷值是否評估為正的無限大。Use IsPositiveInfinity to determine whether a value evaluates to positive infinity.

適用於

另請參閱