Single.NegativeInfinity 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 negative infinity. This field is constant.
public: float NegativeInfinity = -Infinity;
public const float NegativeInfinity = -Infinity;
val mutable NegativeInfinity : single
Public Const NegativeInfinity As Single = -Infinity
Field Value
Value = -InfinityExamples
The following code example demonstrates the NegativeInfinity constant.
// This will equal Infinity.
Console::WriteLine( "10.0 minus NegativeInfinity equals {0}.", (10.0 - Single::NegativeInfinity) );
// This will equal Infinity.
Console.WriteLine("10.0 minus NegativeInfinity equals {0}.", (10.0 - Single.NegativeInfinity).ToString());
// This will equal Infinity.
printfn $"10.0 minus NegativeInfinity equals {10f - Single.NegativeInfinity}."
' This will equal Infinity.
Console.WriteLine("10.0 minus NegativeInfinity equals " + (10 - Single.NegativeInfinity).ToString() + ".")
Remarks
The value of this constant is the result of dividing a negative number by zero.
This constant is returned when the result of an operation is less than MinValue.
Use IsNegativeInfinity to determine whether a value evaluates to negative infinity.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om