StrictMath.AddExact Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddExact(Int32, Int32) |
Returns the sum of its arguments,
throwing an exception if the result overflows an |
AddExact(Int64, Int64) |
Returns the sum of its arguments,
throwing an exception if the result overflows a |
AddExact(Int32, Int32)
Returns the sum of its arguments,
throwing an exception if the result overflows an int
.
[Android.Runtime.Register("addExact", "(II)I", "", ApiSince=24)]
public static int AddExact (int x, int y);
[<Android.Runtime.Register("addExact", "(II)I", "", ApiSince=24)>]
static member AddExact : int * int -> int
Parameters
- x
- Int32
the first value
- y
- Int32
the second value
Returns
the result
- Attributes
Remarks
Returns the sum of its arguments, throwing an exception if the result overflows an int
.
Added in 1.8.
Java documentation for java.lang.StrictMath.addExact(int, 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
AddExact(Int64, Int64)
Returns the sum of its arguments,
throwing an exception if the result overflows a long
.
[Android.Runtime.Register("addExact", "(JJ)J", "", ApiSince=24)]
public static long AddExact (long x, long y);
[<Android.Runtime.Register("addExact", "(JJ)J", "", ApiSince=24)>]
static member AddExact : int64 * int64 -> int64
Parameters
- x
- Int64
the first value
- y
- Int64
the second value
Returns
the result
- Attributes
Remarks
Returns the sum of its arguments, throwing an exception if the result overflows a long
.
Added in 1.8.
Java documentation for java.lang.StrictMath.addExact(long, 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.