Rediger

Del via


LengthConverter.ConvertTo Method

Definition

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

public:
 override System::Object ^ ConvertTo(System::ComponentModel::ITypeDescriptorContext ^ typeDescriptorContext, System::Globalization::CultureInfo ^ cultureInfo, System::Object ^ value, Type ^ destinationType);
[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);
[<System.Security.SecurityCritical>]
override this.ConvertTo : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj * Type -> obj
override this.ConvertTo : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj * Type -> obj
Public Overrides Function ConvertTo (typeDescriptorContext As ITypeDescriptorContext, cultureInfo As CultureInfo, value As Object, destinationType As Type) As Object

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