ModelBinderDictionary.GetBinder Method (Type, Boolean)

Retrieves the model binder for the specified type or retrieves the default model binder.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

'Declaration
Public Overridable Function GetBinder ( _
	modelType As Type, _
	fallbackToDefault As Boolean _
) As IModelBinder
'Usage
Dim instance As ModelBinderDictionary 
Dim modelType As Type 
Dim fallbackToDefault As Boolean 
Dim returnValue As IModelBinder 

returnValue = instance.GetBinder(modelType, _
	fallbackToDefault)

Parameters

modelType
Type: System.Type

The type of the model to retrieve.

fallbackToDefault
Type: System.Boolean

true to retrieve the default model binder.

Return Value

Type: System.Web.Mvc.IModelBinder
The model binder.

ExceptionCondition
ArgumentNullException

The modelType parameter is Nothing.

Show: