BigDecimal.Add Method

Definition

Overloads

Add(BigDecimal)

Returns a BigDecimal whose value is (this + augend), and whose scale is max(this.scale(), augend.scale()).

Add(BigDecimal, MathContext)

Returns a BigDecimal whose value is (this + augend), with rounding according to the context settings.

Add(BigDecimal)

Returns a BigDecimal whose value is (this + augend), and whose scale is max(this.scale(), augend.scale()).

[Android.Runtime.Register("add", "(Ljava/math/BigDecimal;)Ljava/math/BigDecimal;", "GetAdd_Ljava_math_BigDecimal_Handler")]
public virtual Java.Math.BigDecimal? Add (Java.Math.BigDecimal? augend);
[<Android.Runtime.Register("add", "(Ljava/math/BigDecimal;)Ljava/math/BigDecimal;", "GetAdd_Ljava_math_BigDecimal_Handler")>]
abstract member Add : Java.Math.BigDecimal -> Java.Math.BigDecimal
override this.Add : Java.Math.BigDecimal -> Java.Math.BigDecimal

Parameters

augend
BigDecimal

value to be added to this BigDecimal.

Returns

this + augend

Attributes

Exceptions

if augend == null.

Remarks

Java documentation for java.math.BigDecimal.add(java.math.BigDecimal).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Add(BigDecimal, MathContext)

Returns a BigDecimal whose value is (this + augend), with rounding according to the context settings.

[Android.Runtime.Register("add", "(Ljava/math/BigDecimal;Ljava/math/MathContext;)Ljava/math/BigDecimal;", "GetAdd_Ljava_math_BigDecimal_Ljava_math_MathContext_Handler")]
public virtual Java.Math.BigDecimal? Add (Java.Math.BigDecimal? augend, Java.Math.MathContext? mc);
[<Android.Runtime.Register("add", "(Ljava/math/BigDecimal;Ljava/math/MathContext;)Ljava/math/BigDecimal;", "GetAdd_Ljava_math_BigDecimal_Ljava_math_MathContext_Handler")>]
abstract member Add : Java.Math.BigDecimal * Java.Math.MathContext -> Java.Math.BigDecimal
override this.Add : Java.Math.BigDecimal * Java.Math.MathContext -> Java.Math.BigDecimal

Parameters

augend
BigDecimal

value to be added to this BigDecimal.

mc
MathContext

the context to use.

Returns

this + augend, rounded as necessary.

Attributes

Exceptions

if augend == null or mc == null.

Remarks

Java documentation for java.math.BigDecimal.add(java.math.BigDecimal, java.math.MathContext).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to