This documentation is archived and is not being maintained.

Single.MaxValue Field

Represents the largest possible value of Single. This field is constant.

[Visual Basic]
Public Const MaxValue As Single
public const float MaxValue;
public: const float MaxValue;
public var MaxValue : float;


The value of this constant is positive 3.402823e38.


[Visual Basic, C#, C++] The following sample demonstrates the MaxValue constant.

[Visual Basic] 
If S > Single.MaxValue Then
    Console.WriteLine("Your number is larger than a Single.")
End If

if (s > Single.MaxValue)
    Console.WriteLine("Your number is larger than a Single.");

if (s > Single::MaxValue) {
   Console::WriteLine(S"Your number is larger than a Single.");

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

Single Structure | Single Members | System Namespace | MinValue