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.

Decimal.MaxValue Field

 

Represents the largest possible value of Decimal. This field is constant and read-only.

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

Public Shared ReadOnly MaxValue As Decimal

Field Value

Type: System.Decimal

The value of this constant is positive 79,228,162,514,264,337,593,543,950,335.

The following code sample illustrates the use of MaxValue :

Class PiggyBank
    Public ReadOnly Property Capacity() As Decimal
        Get
            Return [Decimal].MaxValue
        End Get
    End Property

    Protected MyFortune As Decimal

    Public Sub AddPenny()
        MyFortune += 0.01D
    End Sub
End Class

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: