BaseNumberConverter.ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type) Method

Definition

Converte l'oggetto specificato in un altro tipo.Converts the specified object to another type.

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);
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

Oggetto ITypeDescriptorContext che fornisce un contesto di formato.An ITypeDescriptorContext that provides a format context.

culture
CultureInfo

Oggetto CultureInfo che specifica le impostazioni cultura per la rappresentazione del numero.A CultureInfo that specifies the culture to represent the number.

value
Object

Oggetto da convertire.The object to convert.

destinationType
Type

Tipo in cui convertire l'oggetto.The type to convert the object to.

Returns

Object

Oggetto Object che rappresenta il valore convertito.An Object that represents the converted value.

Exceptions

destinationType è null.destinationType is null.

Impossibile eseguire la conversione.The conversion cannot be performed.

Applies to