Double.PositiveInfinity Double.PositiveInfinity Double.PositiveInfinity Double.PositiveInfinity Field

定义

表示正无穷。Represents positive infinity. 此字段为常数。This field is constant.

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

字段值

示例

下面的代码示例阐释了的PositiveInfinity用法:The following code example illustrates the use of PositiveInfinity:

// This will equal Infinity.
Console::WriteLine( "PositiveInfinity plus 10.0 equals {0}.", (Double::PositiveInfinity + 10.0) );
// This will equal Infinity.
Console.WriteLine("PositiveInfinity plus 10.0 equals {0}.", (Double.PositiveInfinity + 10.0).ToString());
' This will equal Infinity.
Console.WriteLine("PositiveInfinity plus 10.0 equals " + (Double.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.

适用于

另请参阅