ICollectionModelBinder Interface

Interface for model binding collections.

Namespace
Microsoft.AspNetCore.Mvc.ModelBinding
Assemblies
  • Microsoft.AspNetCore.Mvc.Core

Syntax

public interface ICollectionModelBinder : IModelBinder
interface Microsoft.AspNetCore.Mvc.ModelBinding.ICollectionModelBinder

Methods

CanCreateInstance(System.Type)

Gets an indication whether or not this Microsoft.AspNetCore.Mvc.ModelBinding.ICollectionModelBinder implementation can create an System.Object assignable to <em>targetType</em>.

Arguments:targetType (System.Type) – System.Type of the model.
Return type:System.Boolean
Returns:<code>true</code> if this Microsoft.AspNetCore.Mvc.ModelBinding.ICollectionModelBinder implementation can create an System.Object assignable to <em>targetType</em>; <code>false</code> otherwise.
bool CanCreateInstance(Type targetType)