C# Single MaxValue
Description
Single MaxValue
represents the largest possible value
of Single. This field is constant.
Syntax
Single.MaxValue
has the following syntax.
public const float MaxValue
Example
In the following example uses the Single.MaxValue.
/*from w w w.j a va2 s.co m*/
using System;
public class Example
{
public static void Main()
{
float result1 = 1.867e38f + Single.MaxValue;
Console.WriteLine("{0} (Positive Infinity: {1})",
result1, Single.IsPositiveInfinity(result1));
}
}
The code above generates the following result.