MobileTypeNameConverter.ConvertTo Method (ITypeDescriptorContext, CultureInfo, Object, Type)

Converts the given value object to the specified type, using the specified context and culture information.

Namespace: System.Web.UI.MobileControls
Assembly: System.Web.Mobile (in system.web.mobile.dll)

public:
virtual Object^ ConvertTo (
	ITypeDescriptorContext^ ctx, 
	CultureInfo^ ci, 
	Object^ value, 
	Type^ targetType
) override
public Object ConvertTo (
	ITypeDescriptorContext ctx, 
	CultureInfo ci, 
	Object value, 
	Type targetType
)
public override function ConvertTo (
	ctx : ITypeDescriptorContext, 
	ci : CultureInfo, 
	value : Object, 
	targetType : Type
) : Object
Not applicable.

Parameters

ctx

An ITypeDescriptorContext that provides a format context.

ci

A CultureInfo. If a null reference (Nothing in Visual Basic) is passed, the current culture is assumed.

value

The Object to convert.

targetType

The Type to convert the value parameter to.

Return Value

An Object that represents the converted value.

Exception typeCondition

ArgumentException

value cannot be converted to a type.

This implementation of ConvertTo uses the as operator to convert the value to a Type, and then returns the FullName property of that object.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: