CollectionModelBinder<TElement>.ConvertToCollectionType Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets an Object assignable to targetType
that contains members from
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
Parameters
- collection
- IEnumerable<TElement>
Collection of values retrieved from value providers. null
if nothing was bound.
Returns
An Object assignable to targetType
. null
if nothing
was bound.
Remarks
Extensibility point that allows the bound collection to be manipulated or transformed before being returned from the binder.