UriTypeConverter.ConvertTo Method

Definition

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

C#
public override object ConvertTo (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType);
C#
public override object ConvertTo (System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object? value, Type destinationType);

Parameters

context
ITypeDescriptorContext

An ITypeDescriptorContext that provides a format context.

culture
CultureInfo

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

value
Object

The Object to convert.

destinationType
Type

The Type to convert the value parameter to.

Returns

An Object that represents the converted value.

Exceptions

The destinationType parameter is null.

The conversion cannot be performed.

Applies to