Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Single::PositiveInfinity Field


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Represents positive infinity. This field is constant.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

literal float PositiveInfinity

Field Value

Type: System::Single

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 MaxValue.

Use IsPositiveInfinity to determine whether a value evaluates to positive infinity.

The following code example demonstrates the PositiveInfinity constant.

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

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
© 2018 Microsoft