संपादित करें

इसके माध्यम से साझा किया गया


SelectionRangeConverter.ConvertTo Method

Definition

Converts the specified SelectionRangeConverter object to another type by using the specified culture.

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

Parameters

context
ITypeDescriptorContext

A ITypeDescriptorContext that provides a format context.

culture
CultureInfo

The locale information for the conversion.

value
Object

The Object to convert.

destinationType
Type

The destination Type to convert into.

Returns

An Object that represents the converted value.

Exceptions

destinationType is null.

value cannot be converted to the destinationType.

Remarks

The ConvertTo method is specialized to convert SelectionRange values to their String or InstanceDescriptor representations. Other types are passed to the base class implementation of this method.

Notes to Inheritors

Override this method to provide your own conversion requirements.

The context parameter can be used to extract additional information about the environment this converter is being invoked from. The parameter may be null, so you should always verify the information. Also, properties on the context object may also return null.

Applies to

See also