MaxValue Field
Collapse the table of content
Expand the table of content

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 static readonly decimal MaxValue

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 decimal Capacity {
		get {
			return Decimal.MaxValue;

	protected decimal MyFortune;

	public void AddPenny() {
		MyFortune += .01m;

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