LengthConverter.ConvertTo Method

Definition

Converts other types into instances of Double that represent an object's length.

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

Parameters

typeDescriptorContext
ITypeDescriptorContext

Describes context information of a component, such as its container and PropertyDescriptor.

cultureInfo
CultureInfo

Identifies culture-specific information, including the writing system and the calendar that is used.

value
Object

Identifies the Object that is being converted.

destinationType
Type

The data type that this instance of Double is being converted to.

Returns

A new Object that is the value of the conversion.

Attributes

Exceptions

Occurs if the value is null.

Occurs if the value is not null and is not a Brush, or the destinationType is not valid.

Applies to

Product Versions
.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