ImmutableInterlocked.InterlockedExchange<T> 方法

定义

将数组设置为指定的数组,并将对原始数组的引用作为原子操作返回。

public:
generic <typename T>
 static System::Collections::Immutable::ImmutableArray<T> InterlockedExchange(System::Collections::Immutable::ImmutableArray<T> % location, System::Collections::Immutable::ImmutableArray<T> value);
public static System.Collections.Immutable.ImmutableArray<T> InterlockedExchange<T>(ref System.Collections.Immutable.ImmutableArray<T> location, System.Collections.Immutable.ImmutableArray<T> value);
static member InterlockedExchange : ImmutableArray * System.Collections.Immutable.ImmutableArray<'T> -> System.Collections.Immutable.ImmutableArray<'T>
Public Shared Function InterlockedExchange(Of T) (ByRef location As ImmutableArray(Of T), value As ImmutableArray(Of T)) As ImmutableArray(Of T)

类型参数

T

数组存储的元素的类型。

参数

location
ImmutableArray<T>

要设置为指定值的数组。

value
ImmutableArray<T>

设置 location 参数的值。

返回

location的原始值。

适用于