ValueProviderResult.ConvertTo Method

 

Converts a value that is encapsulated by this result to the specified type.

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

NameDescription
System_CAPS_pubmethodConvertTo(Type)

Converts the value that is encapsulated by this result to the specified type.

System_CAPS_pubmethodConvertTo(Type, CultureInfo)

Converts the value that is encapsulated by this result to the specified type by using the specified culture information.

Return to top

ValueProviderResult.ConvertTo Method (Type)

Converts the value that is encapsulated by this result to the specified type.

public object ConvertTo(
	Type type
)

Parameters

type
Type: System.Type

The target type.

Return Value

Type: System.Object

The converted value.

Exception Condition
ArgumentNullException

The type parameter is null.

Return to top

ValueProviderResult.ConvertTo Method (Type, CultureInfo)

Converts the value that is encapsulated by this result to the specified type by using the specified culture information.

public virtual object ConvertTo(
	Type type,
	CultureInfo culture
)

Parameters

type
Type: System.Type

The target type.

culture
Type: System.Globalization.CultureInfo

The culture to use in the conversion.

Return Value

Type: System.Object

The converted value.

Exception Condition
ArgumentNullException

The type parameter is null.

Return to top
Show: