ValueProviderResult.ConvertTo Method (Type, CultureInfo)

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

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

public virtual object ConvertTo(
	Type type,
	CultureInfo culture
)

Parameters

type
Type: System.Type

The type.

culture
Type: System.Globalization.CultureInfo

The culture information.

Return Value

Type: System.Object

The converted value.

Exception Condition
ArgumentNullException

The type parameter is null.

InvalidOperationException

Conversion was unsuccessful.

.NET Framework
Available since 4.5
Return to top
Show: