BigDecimal.ValueOf Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ValueOf(Int64) |
Translates a |
ValueOf(Int64, Int32) |
Translates a |
ValueOf(Double) |
Translates a |
ValueOf(Int64)
Translates a long
value into a BigDecimal
with a scale of zero.
[Android.Runtime.Register("valueOf", "(J)Ljava/math/BigDecimal;", "")]
public static Java.Math.BigDecimal? ValueOf (long val);
[<Android.Runtime.Register("valueOf", "(J)Ljava/math/BigDecimal;", "")>]
static member ValueOf : int64 -> Java.Math.BigDecimal
Parameters
- val
- Int64
value of the BigDecimal
.
Returns
a BigDecimal
whose value is val
.
- Attributes
Remarks
Java documentation for java.math.BigDecimal.valueOf(long)
.
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
ValueOf(Int64, Int32)
Translates a long
unscaled value and an
int
scale into a BigDecimal
.
[Android.Runtime.Register("valueOf", "(JI)Ljava/math/BigDecimal;", "")]
public static Java.Math.BigDecimal? ValueOf (long unscaledVal, int scale);
[<Android.Runtime.Register("valueOf", "(JI)Ljava/math/BigDecimal;", "")>]
static member ValueOf : int64 * int -> Java.Math.BigDecimal
Parameters
- unscaledVal
- Int64
unscaled value of the BigDecimal
.
- scale
- Int32
scale of the BigDecimal
.
Returns
a BigDecimal
whose value is
(unscaledVal × 10<sup>-scale</sup>)
.
- Attributes
Remarks
Java documentation for java.math.BigDecimal.valueOf(long, int)
.
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
ValueOf(Double)
Translates a double
into a BigDecimal
, using
the double
's canonical string representation provided
by the Double#toString(double)
method.
[Android.Runtime.Register("valueOf", "(D)Ljava/math/BigDecimal;", "")]
public static Java.Math.BigDecimal? ValueOf (double val);
[<Android.Runtime.Register("valueOf", "(D)Ljava/math/BigDecimal;", "")>]
static member ValueOf : double -> Java.Math.BigDecimal
Parameters
- val
- Double
double
to convert to a BigDecimal
.
Returns
a BigDecimal
whose value is equal to or approximately
equal to the value of val
.
- Attributes
Exceptions
if val
is infinite or val
is not a number
Remarks
Java documentation for java.math.BigDecimal.valueOf(double)
.
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.