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 的原始值。

適用於