Partager via


StrictMath.ToIntExact(Int64) Method

Definition

Returns the value of the long argument, throwing an exception if the value overflows an int.

[Android.Runtime.Register("toIntExact", "(J)I", "", ApiSince=24)]
public static int ToIntExact (long value);
[<Android.Runtime.Register("toIntExact", "(J)I", "", ApiSince=24)>]
static member ToIntExact : int64 -> int

Parameters

value
Int64

the long value

Returns

the argument as an int

Attributes

Remarks

Returns the value of the long argument, throwing an exception if the value overflows an int.

Added in 1.8.

Java documentation for java.lang.StrictMath.toIntExact(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