Partager via


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

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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

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

Syntax

'Declaration
Public Overrides Function ConvertTo ( _
    context As ITypeDescriptorContext, _
    culture As CultureInfo, _
    value As Object, _
    destinationType As Type _
) As Object
public override Object ConvertTo(
    ITypeDescriptorContext context,
    CultureInfo culture,
    Object value,
    Type destinationType
)

Parameters

  • destinationType
    Type: System.Type
    The Type to convert the value parameter to.

Return Value

Type: System.Object
An Object that represents the converted value.

Exceptions

Exception Condition
ArgumentNullException

The destinationType parameter is nulla null reference (Nothing in Visual Basic).

NotSupportedException

The conversion cannot be performed.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.