Freigeben über


BigDecimal.LongValue Method

Definition

Converts this BigDecimal to a long.

[Android.Runtime.Register("longValue", "()J", "GetLongValueHandler")]
public override long LongValue ();
[<Android.Runtime.Register("longValue", "()J", "GetLongValueHandler")>]
override this.LongValue : unit -> int64

Returns

this BigDecimal converted to a long.

Attributes

Remarks

Converts this BigDecimal to a long. This conversion is analogous to the narrowing primitive conversion from double to short as defined in <cite>The Java Language Specification</cite>: any fractional part of this BigDecimal will be discarded, and if the resulting "BigInteger" is too big to fit in a long, only the low-order 64 bits are returned. Note that this conversion can lose information about the overall magnitude and precision of this BigDecimal value as well as return a result with the opposite sign.

Java documentation for java.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.

Applies to