ImmutableArray<T>.CastArray<TOther> Metódus

Definíció

Inicializálja a szerkezet új példányát úgy ImmutableArray<T> , hogy az alapul szolgáló tömböt egy típustömbre TOtheröntötte.

public:
generic <typename TOther>
 where TOther : class System::Collections::Immutable::ImmutableArray<TOther> CastArray();
public System.Collections.Immutable.ImmutableArray<TOther> CastArray<TOther>() where TOther : class;
member this.CastArray : unit -> System.Collections.Immutable.ImmutableArray<'Other (requires 'Other : null)> (requires 'Other : null)
Public Function CastArray(Of TOther As Class) () As ImmutableArray(Of TOther)

Típusparaméterek

TOther

A visszaadandó tömbelem típusa.

Válaszok

ImmutableArray<TOther>

Nem módosítható tömbpéldány, amely az új típusra öntött elemeket tartalmazza.

Kivételek

A szereposztás illegális.

A következőre érvényes: