ImmutableArray<T>.CastArray<TOther> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
透過將底層陣列鑄造為型別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>
一個不可變的陣列實例,元素被鑄造為新型別。
例外狀況
石膏是非法的。