This documentation is archived and is not being maintained.

Double.MaxValue Field

Represents the largest possible value of a Double. This field is constant.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Public Const MaxValue As Double
Dim value As Double

value = Double.MaxValue

public static final double MaxValue
public const var MaxValue : double
Not applicable.

The value of this constant is positive 1.79769313486232e308.

The following code example illustrates the use of MaxValue:

Public Class Temperature

    Public Shared ReadOnly Property MinValue() As Double
            Return Double.MinValue
        End Get
    End Property

    Public Shared ReadOnly Property MaxValue() As Double
            Return Double.MaxValue
        End Get
    End Property

    ' The value holder
    Protected m_value As Double

    Public Property Value() As Double
            Return m_value
        End Get
        Set(ByVal Value As Double)
            m_value = Value
        End Set
    End Property

    Public Property Celsius() As Double
            Return (m_value - 32) / 1.8
        End Get
        Set(ByVal Value As Double)
            m_value = Value * 1.8 + 32
        End Set
    End Property
End Class

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

XNA Framework

Supported in: 1.0