Επεξεργασία

Κοινή χρήση μέσω


ImmutableArray<T>.CastArray<TOther> Method

Definition

Initializes a new instance of the ImmutableArray<T> struct by casting the underlying array to an array of type TOther.

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)

Type Parameters

TOther

The type of array element to return.

Returns

ImmutableArray<TOther>

An immutable array instance with elements cast to the new type.

Exceptions

The cast is illegal.

Applies to