共用方式為


CollectionModelBinder<TElement>.ConvertToCollectionType 方法

定義

Object取得可指派的 , targetType 其中包含 的成員。 collection

protected:
 virtual System::Object ^ ConvertToCollectionType(Type ^ targetType, System::Collections::Generic::IEnumerable<TElement> ^ collection);
protected virtual object ConvertToCollectionType (Type targetType, System.Collections.Generic.IEnumerable<TElement> collection);
protected virtual object? ConvertToCollectionType (Type targetType, System.Collections.Generic.IEnumerable<TElement?> collection);
abstract member ConvertToCollectionType : Type * seq<'Element> -> obj
override this.ConvertToCollectionType : Type * seq<'Element> -> obj
Protected Overridable Function ConvertToCollectionType (targetType As Type, collection As IEnumerable(Of TElement)) As Object

參數

targetType
Type

Type 模型的 。

collection
IEnumerable<TElement>

從值提供者擷取的值集合。 null 如果未系結任何內容,則為 。

傳回

Object可指派給 targetTypenull 如果未系結任何內容,則為 。

備註

擴充點,允許在從系結器傳回之前,先操作或轉換系結集合。

適用於