Interlocked.Or 方法

定义

重载

名称 说明
Or(Int32, Int32)

按位“ors”两个 32 位有符号整数,并将第一个整数替换为结果,作为原子操作。

Or(Int64, Int64)

按位“ors”两个 64 位有符号整数,并将第一个整数替换为结果,作为原子操作。

Or(UInt32, UInt32)

按位“ors”两个 32 位无符号整数,并将第一个整数替换为结果,作为原子操作。

Or(UInt64, UInt64)

按位“ors”两个 64 位无符号整数,并将第一个整数替换为结果,作为原子操作。

Or<T>(T, T)

Or(Int32, Int32)

Source:
Interlocked.cs
Source:
Interlocked.cs
Source:
Interlocked.cs
Source:
Interlocked.cs
Source:
Interlocked.cs

按位“ors”两个 32 位有符号整数,并将第一个整数替换为结果,作为原子操作。

public:
 static int Or(int % location1, int value);
public static int Or(ref int location1, int value);
static member Or : int * int -> int
Public Shared Function Or (ByRef location1 As Integer, value As Integer) As Integer

参数

location1
Int32

包含要组合的第一个值的变量。 结果存储在 location1.

value
Int32

要与整数组合在一起 location1的值。

返回

中的 location1原始值。

例外

location1地址是指针null

适用于

Or(Int64, Int64)

Source:
Interlocked.cs
Source:
Interlocked.cs
Source:
Interlocked.cs
Source:
Interlocked.cs
Source:
Interlocked.cs

按位“ors”两个 64 位有符号整数,并将第一个整数替换为结果,作为原子操作。

public:
 static long Or(long % location1, long value);
public static long Or(ref long location1, long value);
static member Or : int64 * int64 -> int64
Public Shared Function Or (ByRef location1 As Long, value As Long) As Long

参数

location1
Int64

包含要组合的第一个值的变量。 结果存储在 location1.

value
Int64

要与整数组合在一起 location1的值。

返回

中的 location1原始值。

例外

location1地址是指针null

适用于

Or(UInt32, UInt32)

Source:
Interlocked.cs
Source:
Interlocked.cs
Source:
Interlocked.cs
Source:
Interlocked.cs
Source:
Interlocked.cs

重要

此 API 不符合 CLS。

按位“ors”两个 32 位无符号整数,并将第一个整数替换为结果,作为原子操作。

public:
 static System::UInt32 Or(System::UInt32 % location1, System::UInt32 value);
[System.CLSCompliant(false)]
public static uint Or(ref uint location1, uint value);
[<System.CLSCompliant(false)>]
static member Or : uint32 * uint32 -> uint32
Public Shared Function Or (ByRef location1 As UInteger, value As UInteger) As UInteger

参数

location1
UInt32

包含要组合的第一个值的变量。 结果存储在 location1.

value
UInt32

要与整数组合在一起 location1的值。

返回

中的 location1原始值。

属性

例外

location1地址是指针null

适用于

Or(UInt64, UInt64)

Source:
Interlocked.cs
Source:
Interlocked.cs
Source:
Interlocked.cs
Source:
Interlocked.cs
Source:
Interlocked.cs

重要

此 API 不符合 CLS。

按位“ors”两个 64 位无符号整数,并将第一个整数替换为结果,作为原子操作。

public:
 static System::UInt64 Or(System::UInt64 % location1, System::UInt64 value);
[System.CLSCompliant(false)]
public static ulong Or(ref ulong location1, ulong value);
[<System.CLSCompliant(false)>]
static member Or : uint64 * uint64 -> uint64
Public Shared Function Or (ByRef location1 As ULong, value As ULong) As ULong

参数

location1
UInt64

包含要组合的第一个值的变量。 结果存储在 location1.

value
UInt64

要与整数组合在一起 location1的值。

返回

中的 location1原始值。

属性

例外

location1地址是指针null

适用于

Or<T>(T, T)

Source:
Interlocked.cs
public:
generic <typename T>
 where T : value class static T Or(T % location1, T value);
public static T Or<T>(ref T location1, T value) where T : struct;
static member Or : 'T * 'T -> 'T (requires 'T : struct)
Public Shared Function Or(Of T As Structure) (ByRef location1 As T, value As T) As T

类型参数

T

参数

location1
T
value
T

返回

T

适用于