ImmutableArray<T>.CastUp<TDerived> 메서드

정의

기존 인스턴스의 내용을 기반으로 구조체의 ImmutableArray<T> 새 인스턴스를 초기화하여 공변 정적 캐스트가 기존 배열을 효율적으로 재사용할 수 있도록 합니다.

public:
generic <typename TDerived>
 where TDerived : class, T static System::Collections::Immutable::ImmutableArray<T> CastUp(System::Collections::Immutable::ImmutableArray<TDerived> items);
public static System.Collections.Immutable.ImmutableArray<T> CastUp<TDerived>(System.Collections.Immutable.ImmutableArray<TDerived> items) where TDerived : class, T;
static member CastUp : System.Collections.Immutable.ImmutableArray<#'T> -> System.Collections.Immutable.ImmutableArray<'T>
Public Shared Function CastUp(Of TDerived As {Class, T}) (items As ImmutableArray(Of TDerived)) As ImmutableArray(Of T)

형식 매개 변수

TDerived

반환할 배열 요소의 형식입니다.

매개 변수

items
ImmutableArray<TDerived>

배열을 초기화할 배열입니다. 복사는 수행되지 않습니다.

반품

요소가 새 형식으로 캐스팅된 변경할 수 없는 배열 인스턴스입니다.

설명

이 메서드의 공변 업캐스트는 또는 As 메서드를 CastArray 호출하여 되돌릴 수 있습니다.

적용 대상