BigDecimal.LongValue 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.
Converts this BigDecimal
to a long
.
[Android.Runtime.Register("longValue", "()J", "GetLongValueHandler", ApiSince=24)]
public override long LongValue ();
[<Android.Runtime.Register("longValue", "()J", "GetLongValueHandler", ApiSince=24)>]
override this.LongValue : unit -> int64
Returns
A long
converted from this
, truncated and decapitated if necessary.
- Attributes
Remarks
Converts this BigDecimal
to a long
. If the BigDecimal
has a non-zero decimal part it is discarded. If the BigDecimal
is out of the possible range for a long
(64-bit signed integer) result then only the low-order 64 bits are used. (That is, the number may be decapitated.) To avoid unexpected errors when these conditions occur, use the #longValueExact
method.
Java documentation for android.icu.math.BigDecimal.longValue()
.
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.