共用方式為


TreeNodeConverter.ConvertTo 方法

定義

使用指定的內容和文化特性資訊,將給定的值物件轉換為指定的類型。

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

提供格式內容的 ITypeDescriptorContext

culture
CultureInfo

CultureInfo。 如果傳遞 null,則會採用目前的文化特性。

value
Object

要進行轉換的 Object

destinationType
Type

要轉換值參數的目標 Type

傳回

Object

Object,代表轉換過的值。

適用於

另請參閱