ImmutableArray<T>.CastArray<TOther> 方法

定義

透過將底層陣列鑄造為型別ImmutableArray<T>為 的陣列,初始化結構體的新實例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)

類型參數

TOther

要回傳的陣列元素類型。

傳回

ImmutableArray<TOther>

一個不可變的陣列實例,元素被鑄造為新型別。

例外狀況

石膏是非法的。

適用於