Math.NegateExact Method

Definition

Overloads

NegateExact(Int32)

Returns the negation of the argument, throwing an exception if the result overflows an int.

NegateExact(Int64)

Returns the negation of the argument, throwing an exception if the result overflows a long.

NegateExact(Int32)

Returns the negation of the argument, throwing an exception if the result overflows an int.

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

Parameters

a
Int32

the value to negate

Returns

the result

Attributes

Remarks

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

NegateExact(Int64)

Returns the negation of the argument, throwing an exception if the result overflows a long.

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

Parameters

a
Int64

the value to negate

Returns

the result

Attributes

Remarks

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