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

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

[Visual Basic]
Public Const MaxValue As Single
[C#]
public const float MaxValue;
[C++]
public: const float MaxValue;
[JScript]
public var MaxValue : float;

Remarks

The value of this constant is positive 3.402823e38.

Example

[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

[C#] 
if (s > Single.MaxValue)
{
    Console.WriteLine("Your number is larger than a Single.");
}

[C++] 
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.

Requirements

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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft