Interlocked.And 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
And(Int32, Int32) |
Bitwise "ands" two 32-bit signed integers and replaces the first integer with the result, as an atomic operation. |
And(Int64, Int64) |
Bitwise "ands" two 64-bit signed integers and replaces the first integer with the result, as an atomic operation. |
And(UInt32, UInt32) |
Bitwise "ands" two 32-bit unsigned integers and replaces the first integer with the result, as an atomic operation. |
And(UInt64, UInt64) |
Bitwise "ands" two 64-bit unsigned integers and replaces the first integer with the result, as an atomic operation. |
And(Int32, Int32)
- Source:
- Interlocked.cs
- Source:
- Interlocked.cs
- Source:
- Interlocked.cs
Bitwise "ands" two 32-bit signed integers and replaces the first integer with the result, as an atomic operation.
public:
static int And(int % location1, int value);
public static int And (ref int location1, int value);
static member And : int * int -> int
Public Shared Function And (ByRef location1 As Integer, value As Integer) As Integer
Parameters
- location1
- Int32
A variable containing the first value to be combined. The result is stored in location1
.
- value
- Int32
The value to be combined with the integer at location1
.
Returns
The original value in location1
.
Exceptions
The address of location1
is a null
pointer.
Applies to
And(Int64, Int64)
- Source:
- Interlocked.cs
- Source:
- Interlocked.cs
- Source:
- Interlocked.cs
Bitwise "ands" two 64-bit signed integers and replaces the first integer with the result, as an atomic operation.
public:
static long And(long % location1, long value);
public static long And (ref long location1, long value);
static member And : int64 * int64 -> int64
Public Shared Function And (ByRef location1 As Long, value As Long) As Long
Parameters
- location1
- Int64
A variable containing the first value to be combined. The result is stored in location1
.
- value
- Int64
The value to be combined with the integer at location1
.
Returns
The original value in location1
.
Exceptions
The address of location1
is a null
pointer.
Applies to
And(UInt32, UInt32)
- Source:
- Interlocked.cs
- Source:
- Interlocked.cs
- Source:
- Interlocked.cs
Important
This API is not CLS-compliant.
Bitwise "ands" two 32-bit unsigned integers and replaces the first integer with the result, as an atomic operation.
public:
static System::UInt32 And(System::UInt32 % location1, System::UInt32 value);
[System.CLSCompliant(false)]
public static uint And (ref uint location1, uint value);
[<System.CLSCompliant(false)>]
static member And : uint32 * uint32 -> uint32
Public Shared Function And (ByRef location1 As UInteger, value As UInteger) As UInteger
Parameters
- location1
- UInt32
A variable containing the first value to be combined. The result is stored in location1
.
- value
- UInt32
The value to be combined with the integer at location1
.
Returns
The original value in location1
.
- Attributes
Exceptions
The address of location1
is a null
pointer.
Applies to
And(UInt64, UInt64)
- Source:
- Interlocked.cs
- Source:
- Interlocked.cs
- Source:
- Interlocked.cs
Important
This API is not CLS-compliant.
Bitwise "ands" two 64-bit unsigned integers and replaces the first integer with the result, as an atomic operation.
public:
static System::UInt64 And(System::UInt64 % location1, System::UInt64 value);
[System.CLSCompliant(false)]
public static ulong And (ref ulong location1, ulong value);
[<System.CLSCompliant(false)>]
static member And : uint64 * uint64 -> uint64
Public Shared Function And (ByRef location1 As ULong, value As ULong) As ULong
Parameters
- location1
- UInt64
A variable containing the first value to be combined. The result is stored in location1
.
- value
- UInt64
The value to be combined with the integer at location1
.
Returns
The original value in location1
.
- Attributes
Exceptions
The address of location1
is a null
pointer.