共用方式為


DateTimeOffsetConverter.ConvertTo 方法

定義

DateTimeOffset 轉換為指定型別的物件。

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

參數

context
ITypeDescriptorContext

日期格式內容。

culture
CultureInfo

日期文化特性。

value
Object

要轉換的 DateTimeOffset

destinationType
Type

要轉換的目標類型。

傳回

指定之型別的物件,表示 DateTimeOffset

例外狀況

無法執行轉換作業。

適用於