Double.PositiveInfinity Field
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Field Value
Value = InfinityExamples
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.
printfn $"PositiveInfinity plus 10.0 equals {Double.PositiveInfinity + 10.}."
' This will equal Infinity.
Console.WriteLine("PositiveInfinity plus 10.0 equals " + (Double.PositiveInfinity + 10).ToString() + ".")
Remarks
The value of this constant is the result of dividing a positive number by zero.
This constant is returned when the result of an operation is greater than Double.MaxValue.
Use IsPositiveInfinity to determine whether a value evaluates to positive infinity.
Applies to
See also
ทํางานร่วมกับเราใน GitHub
แหล่งที่มาสำหรับเนื้อหานี้สามารถพบได้บน GitHub ซึ่งคุณยังสามารถสร้างและตรวจสอบปัญหาและคำขอดึงข้อมูลได้ สำหรับข้อมูลเพิ่มเติม ให้ดูคู่มือผู้สนับสนุนของเรา