DateTimeOffsetConverter.ConvertTo Metod

Definition

Konverterar ett DateTimeOffset till ett objekt av den angivna typen.

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

Datumformatkontexten.

culture
CultureInfo

Datumkulturen.

value
Object

Som DateTimeOffset ska konverteras.

destinationType
Type

Den typ som ska konverteras till.

Returer

Ett objekt av den angivna typen som representerar DateTimeOffset.

Undantag

Konverteringen kan inte utföras.

Gäller för