MobileTypeNameConverter.ConvertFrom Method (ITypeDescriptorContext, CultureInfo, Object)

Note: This method is new in the .NET Framework version 2.0.

Converts the given object to the type of this converter, using the specified context and culture information.

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

public:
virtual Object^ ConvertFrom (
	ITypeDescriptorContext^ ctx, 
	CultureInfo^ ci, 
	Object^ data
) override
public Object ConvertFrom (
	ITypeDescriptorContext ctx, 
	CultureInfo ci, 
	Object data
)
public override function ConvertFrom (
	ctx : ITypeDescriptorContext, 
	ci : CultureInfo, 
	data : Object
) : Object

Parameters

ctx

An ITypeDescriptorContext that provides a format context.

ci

The CultureInfo to use as the current culture.

data

The Object to convert.

Return Value

An Object that represents the converted value.

Exception typeCondition

ConfigurationErrorsException

Calling GetType on data returns a null reference (Nothing in Visual Basic).

This implementation of ConvertFrom casts data as a string and then calls the GetType method on it. The result, a new Type, is then returned. However, if the result is a null reference (Nothing in Visual Basic), an exception will be thrown.

Windows 98, Windows 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 .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show: