BigInteger.LongValue Method

Definition

Converts this BigInteger 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 BigInteger converted to a long.

Attributes

Remarks

Converts this BigInteger to a long. This conversion is analogous to a narrowing primitive conversion from long to int as defined in <cite>The Java Language Specification</cite>: if this 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 of the BigInteger value as well as return a result with the opposite sign.

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