DynamicResourceExtensionConverter.ConvertTo Method

Definition

Converts the specified object to another type.

[System.Security.SecurityCritical]
public override object ConvertTo (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType);
public override object ConvertTo (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType);

Parameters

context
ITypeDescriptorContext

An ITypeDescriptorContext object that provides a format context.

culture
CultureInfo

A CultureInfo object that specifies the culture to represent the number.

value
Object

Value to be converted. This is expected to be type DynamicResourceExtension.

destinationType
Type

Type that should be converted to.

Returns

The returned converted object. Cast this to the requested type. Ordinarily this should be cast to InstanceDescriptor.

Attributes

Exceptions

value could not be assigned as DynamicResourceExtension.

value is null.

Remarks

destinationType is expected to be type InstanceDescriptor; if not, then the implementation falls through to base (ConvertTo, which may throw an exception).

Applies to

产品 版本
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9