ModelBinderDictionary::GetBinder Method

 

Retrieves the model binder.

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

NameDescription
System_CAPS_pubmethodGetBinder(Type^)

Retrieves the model binder for the specified type.

System_CAPS_pubmethodGetBinder(Type^, Boolean)

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

Return to top

ModelBinderDictionary::GetBinder Method (Type^)

Retrieves the model binder for the specified type.

public:
IModelBinder^ GetBinder(
	Type^ modelType
)

Parameters

modelType
Type: System::Type^

The type of the model to retrieve.

Return Value

Type: System.Web.Mvc::IModelBinder^

The model binder.

Exception Condition
ArgumentNullException

The modelType parameter is null.

Return to top

ModelBinderDictionary::GetBinder Method (Type^, Boolean)

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

public:
virtual IModelBinder^ GetBinder(
	Type^ modelType,
	bool 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.

Exception Condition
ArgumentNullException

The modelType parameter is null.

Return to top
Show: