ImmutableInterlocked.InterlockedInitialize<T> 方法

定義

如果陣列尚未初始化,則將陣列設為指定的陣列。

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

類型參數

T

陣列所儲存的項目類型。

參數

location
ImmutableArray<T>

要設定為特定值的陣列。

value
ImmutableArray<T>

location 參數設為該值 (如果參數尚未初始化)。

傳回

Boolean

如果陣列已經指派指定的值則為 true,否則為 false

適用於