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() + ".")

注解

此常量的值是正数除以 0 的结果。The value of this constant is the result of dividing a positive number by zero.

大于运算的结果时返回此常量MaxValueThis 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.

适用于

另请参阅