DateTimeOffsetConverter.ConvertFrom 方法

定义

将指定对象转换为 DateTimeOffset

public:
 override System::Object ^ ConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ context, System::Globalization::CultureInfo ^ culture, System::Object ^ value);
public override object ConvertFrom (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value);
public override object? ConvertFrom (System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object value);
override this.ConvertFrom : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj -> obj
Public Overrides Function ConvertFrom (context As ITypeDescriptorContext, culture As CultureInfo, value As Object) As Object

参数

context
ITypeDescriptorContext

日期格式上下文。

culture
CultureInfo

日期区域性。

value
Object

要转换的对象。

返回

表示指定对象的 DateTimeOffset

例外

无法执行转换。

适用于