Java.Math.BigDecimal.ValueOf Method
Returns a new BigDecimal instance whose value is equal to val.

Syntax

[Android.Runtime.Register("valueOf", "(D)Ljava/math/BigDecimal;", "")]
public static BigDecimal ValueOf (double val)

Parameters

val
double value to be converted to a BigDecimal.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.NumberFormatExceptionif val is infinite or val is not a number

Remarks

Returns a new BigDecimal instance whose value is equal to val. The new decimal is constructed as if the BigDecimal(String) constructor is called with an argument which is equal to Double.toString(val). For example, valueOf("0.1") is converted to (unscaled=1, scale=1), although the double 0.1 cannot be represented exactly as a double value. In contrast to that, a new BigDecimal(0.1) instance has the value 0.1000000000000000055511151231257827021181583404541015625 with an unscaled value 1000000000000000055511151231257827021181583404541015625 and the scale 55.

[Android Documentation]

Requirements

Namespace: Java.Math
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1