Share via


ImmutableInterlocked.InterlockedInitialize<T> Methode

Definition

Legt ein Array auf das angegebene Array fest, wenn das Array nicht initialisiert wurde.

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

Typparameter

T

Der Typ des Elements, das durch das Array gespeichert wird.

Parameter

location
ImmutableArray<T>

Das Array, das auf den angegebenen Wert festgelegt werden soll.

value
ImmutableArray<T>

Der Wert, auf den der location-Parameter festgelegt wird, wenn er nicht initialisiert wird.

Gibt zurück

true , wenn dem Array der angegebene Wert zugewiesen wurde; falseandernfalls .

Gilt für: