共用方式為


Math.IncrementExact Method

Definition

Overloads

IncrementExact(Int32)

Returns the argument incremented by one, throwing an exception if the result overflows an int.

IncrementExact(Int64)

Returns the argument incremented by one, throwing an exception if the result overflows a long.

IncrementExact(Int32)

Returns the argument incremented by one, throwing an exception if the result overflows an int.

[Android.Runtime.Register("incrementExact", "(I)I", "", ApiSince=24)]
public static int IncrementExact (int a);
[<Android.Runtime.Register("incrementExact", "(I)I", "", ApiSince=24)>]
static member IncrementExact : int -> int

Parameters

a
Int32

the value to increment

Returns

the result

Attributes

Remarks

Java documentation for java.lang.Math.incrementExact(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

IncrementExact(Int64)

Returns the argument incremented by one, throwing an exception if the result overflows a long.

[Android.Runtime.Register("incrementExact", "(J)J", "", ApiSince=24)]
public static long IncrementExact (long a);
[<Android.Runtime.Register("incrementExact", "(J)J", "", ApiSince=24)>]
static member IncrementExact : int64 -> int64

Parameters

a
Int64

the value to increment

Returns

the result

Attributes

Remarks

Java documentation for java.lang.Math.incrementExact(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