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.





















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version