Editare

Partajați prin


MobileTypeNameConverter.ConvertTo Method

Definition

Converts the given value object to the specified type, using the specified context and culture information. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

public:
 override System::Object ^ ConvertTo(System::ComponentModel::ITypeDescriptorContext ^ ctx, System::Globalization::CultureInfo ^ ci, System::Object ^ value, Type ^ targetType);
public override object ConvertTo (System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object value, Type targetType);
override this.ConvertTo : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj * Type -> obj
Public Overrides Function ConvertTo (ctx As ITypeDescriptorContext, ci As CultureInfo, value As Object, targetType As Type) As Object

Parameters

ctx
ITypeDescriptorContext

An ITypeDescriptorContext that provides a format context.

ci
CultureInfo

A CultureInfo. If null is passed, the current culture is assumed.

value
Object

The Object to convert.

targetType
Type

The Type to convert the value parameter to.

Returns

An Object that represents the converted value.

Exceptions

value cannot be converted to a type.

Remarks

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

Applies to

See also