Interlocked.And 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| And(Int32, Int32) |
位 “ands” 兩個 32 位帶正負號的整數,並以結果取代第一個整數,做為不可部分完成的作業。 |
| And(Int64, Int64) |
位 “ands” 兩個 64 位帶正負號的整數,並以結果取代第一個整數,做為不可部分完成的作業。 |
| And(UInt32, UInt32) |
位 “ands” 兩個 32 位無符號整數,並以結果取代第一個整數,做為不可部分完成的作業。 |
| And(UInt64, UInt64) |
位 “ands” 兩個 64 位無符號整數,並以結果取代第一個整數,做為不可部分完成的作業。 |
| And<T>(T, T) |
And(Int32, Int32)
位 “ands” 兩個 32 位帶正負號的整數,並以結果取代第一個整數,做為不可部分完成的作業。
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
參數
- location1
- Int32
一個包含第一個要合併值的變數。 結果儲存在 location1。
- value
- Int32
將與整 location1數在 處的值結合。
傳回
原始值為 location1。
例外狀況
的 location1 位址是一個 null 指標。
適用於
And(Int64, Int64)
位 “ands” 兩個 64 位帶正負號的整數,並以結果取代第一個整數,做為不可部分完成的作業。
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
參數
- location1
- Int64
一個包含第一個要合併值的變數。 結果儲存在 location1。
- value
- Int64
將與整 location1數在 處的值結合。
傳回
原始值為 location1。
例外狀況
的 location1 位址是一個 null 指標。
適用於
And(UInt32, UInt32)
重要
此 API 不符合 CLS 規範。
位 “ands” 兩個 32 位無符號整數,並以結果取代第一個整數,做為不可部分完成的作業。
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
參數
- location1
- UInt32
一個包含第一個要合併值的變數。 結果儲存在 location1。
- value
- UInt32
將與整 location1數在 處的值結合。
傳回
原始值為 location1。
- 屬性
例外狀況
的 location1 位址是一個 null 指標。
適用於
And(UInt64, UInt64)
重要
此 API 不符合 CLS 規範。
位 “ands” 兩個 64 位無符號整數,並以結果取代第一個整數,做為不可部分完成的作業。
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
參數
- location1
- UInt64
一個包含第一個要合併值的變數。 結果儲存在 location1。
- value
- UInt64
將與整 location1數在 處的值結合。
傳回
原始值為 location1。
- 屬性
例外狀況
的 location1 位址是一個 null 指標。
適用於
And<T>(T, T)
public:
generic <typename T>
where T : value class static T And(T % location1, T value);
public static T And<T>(ref T location1, T value) where T : struct;
static member And : 'T * 'T -> 'T (requires 'T : struct)
Public Shared Function And(Of T As Structure) (ByRef location1 As T, value As T) As T
類型參數
- T
參數
- location1
- T
- value
- T