Export (0) Print
Expand All

ObjectConverter.ConvertValue Method

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Converts an object from one object type to another object type. This class is obsolete. Use the Convert class and the Format method instead.

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

public static Object ConvertValue(
	Object value,
	Type toType,
	string formatString
)

Parameters

value
Type: System.Object

The object to convert.

toType
Type: System.Type

The Type to convert value to.

formatString
Type: System.String

The format string to apply during conversion.

Return Value

Type: System.Object
The converted object.

ExceptionCondition
ArgumentException

Value cannot be converted to type toType with this method.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
Show:
© 2015 Microsoft