ArrayModelBinder<TElement>.ConvertToCollectionType 方法

定义

获取一个 ObjecttargetType 分配给的 ,其中包含 来自 collection的成员。

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

参数

targetType
Type

Type 模型的 。

collection
IEnumerable<TElement>

从值提供程序检索到的值的集合。 null 如果未绑定任何内容,则为 。

返回

ObjecttargetType分配给 的 。 null 如果未绑定任何内容,则为 。

适用于