DurationConverter.ConvertTo 方法

定义

Duration 的实例转换为另一种类型。

public:
 override System::Object ^ ConvertTo(System::ComponentModel::ITypeDescriptorContext ^ context, System::Globalization::CultureInfo ^ cultureInfo, System::Object ^ value, Type ^ destinationType);
[System.Security.SecurityCritical]
public override object ConvertTo (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo cultureInfo, object value, Type destinationType);
public override object ConvertTo (System.ComponentModel.ITypeDescriptorContext context, System.Globalization.CultureInfo cultureInfo, object value, Type destinationType);
[<System.Security.SecurityCritical>]
override this.ConvertTo : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj * Type -> obj
override this.ConvertTo : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj * Type -> obj
Public Overrides Function ConvertTo (context As ITypeDescriptorContext, cultureInfo As CultureInfo, value As Object, destinationType As Type) As Object

参数

context
ITypeDescriptorContext

用于转换的上下文信息。

cultureInfo
CultureInfo

转换过程中需要考虑的区域性信息。

value
Object

要转换的持续时间值。

destinationType
Type

要进行计算以供转换的类型。

返回

destinationType 的新实例。

属性

注解

destinationType 必须为 String

适用于