Adds two integers and replaces the first integer with the sum, as an atomic operation.
Overloads Add(Int32, Int32)Adds two 32-bit integers and replaces the first integer with the sum, as an atomic operation.
Add(Int64, Int64)Adds two 64-bit integers and replaces the first integer with the sum, as an atomic operation.
Add(UInt32, UInt32)Adds two 32-bit unsigned integers and replaces the first integer with the sum, as an atomic operation.
Add(UInt64, UInt64)Adds two 64-bit unsigned integers and replaces the first integer with the sum, as an atomic operation.
Add(Int32, Int32)Adds two 32-bit integers and replaces the first integer with the sum, as an atomic operation.
public:
static int Add(int % location1, int value);
public static int Add(ref int location1, int value);
static member Add : int * int -> int
Public Shared Function Add (ByRef location1 As Integer, value As Integer) As Integer
Parameters
A variable containing the first value to be added. The sum of the two values is stored in location1
.
The value to be added to the integer at location1
.
The new value that was stored at location1
by this operation.
The address of location1
is a null pointer.
This method handles an overflow condition by wrapping: if the value at location1
is Int32.MaxValue and value
is 1, the result is Int32.MinValue; if value
is 2, the result is (Int32.MinValue + 1); and so on. No exception is thrown.
Important
This API is not CLS-compliant.
Adds two 32-bit unsigned integers and replaces the first integer with the sum, as an atomic operation.
public:
static System::UInt32 Add(System::UInt32 % location1, System::UInt32 value);
[System.CLSCompliant(false)]
public static uint Add(ref uint location1, uint value);
[<System.CLSCompliant(false)>]
static member Add : uint32 * uint32 -> uint32
Public Shared Function Add (ByRef location1 As UInteger, value As UInteger) As UInteger
Parameters
A variable containing the first value to be added. The sum of the two values is stored in location1
.
The value to be added to the integer at location1
.
The new value that was stored at location1
by this operation.
The address of location1
is a null
pointer.
Important
This API is not CLS-compliant.
Adds two 64-bit unsigned integers and replaces the first integer with the sum, as an atomic operation.
public:
static System::UInt64 Add(System::UInt64 % location1, System::UInt64 value);
[System.CLSCompliant(false)]
public static ulong Add(ref ulong location1, ulong value);
[<System.CLSCompliant(false)>]
static member Add : uint64 * uint64 -> uint64
Public Shared Function Add (ByRef location1 As ULong, value As ULong) As ULong
Parameters
A variable containing the first value to be added. The sum of the two values is stored in location1
.
The value to be added to the integer at location1
.
The new value that was stored at location1
by this operation.
The address of location1
is a null
pointer.
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this articleWas this page helpful?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4