DecimalConverter.ConvertTo Metod

Definition

Konverterar det angivna värdeobjektet till ett Decimal med hjälp av argumenten.

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

Parametrar

context
ITypeDescriptorContext

En ITypeDescriptorContext som ger en formatkontext.

culture
CultureInfo

Ett valfritt CultureInfo. Om den inte tillhandahålls antas den aktuella kulturen.

value
Object

Att Object konvertera.

destinationType
Type

Att Type konvertera värdet till.

Returer

En Object som representerar det konverterade värdet.

Undantag

destinationType är null.

Konverteringen kan inte utföras.

Gäller för