DataBindingCollectionConverter.ConvertTo Method

Definition

Converts a data binding collection to the specified type.

C#
public override object ConvertTo (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType);

Parameters

context
ITypeDescriptorContext

An ITypeDescriptorContext that indicates the component or control to which the data binding collection belongs.

culture
CultureInfo

A CultureInfo that can be used to provide additional culture information.

value
Object

The object to convert.

destinationType
Type

The type to convert to.

Returns

The object produced by the type conversion. If the destinationType parameter is of type String, this method returns an empty string ("").

Remarks

This method returns an empty string if the destinationType parameter is of type String. Otherwise this method calls the ConvertTo method of the base TypeConverter class.

Applies to

Produit Versions
.NET Framework 1.1, 2.0, 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