Adds two specified decimal values.
![]()
The result of adding d1 and d2.
Type Reason OverflowException The sum of d1 and d2 is greater than decimal.MaxValue or less than decimal.MinValue.
The decimal.op_Addition(decimal, decimal) method defines the operation of the addition operator for decimal values. It enables code such as the following:
code reference: System.Decimal.Operators#3
If the language you're using doesn't support custom operators, call the decimal.Add(decimal, decimal) method instead.