Share via


ColumnHeaderConverter.CanConvertTo(ITypeDescriptorContext, Type) 方法

定義

傳回值,指出 ColumnHeaderConverter 是否可以使用指定的內容,將 ColumnHeader 轉換成指定的型別。

public:
 override bool CanConvertTo(System::ComponentModel::ITypeDescriptorContext ^ context, Type ^ destinationType);
public override bool CanConvertTo (System.ComponentModel.ITypeDescriptorContext context, Type destinationType);
public override bool CanConvertTo (System.ComponentModel.ITypeDescriptorContext? context, Type? destinationType);
override this.CanConvertTo : System.ComponentModel.ITypeDescriptorContext * Type -> bool
Public Overrides Function CanConvertTo (context As ITypeDescriptorContext, destinationType As Type) As Boolean

參數

context
ITypeDescriptorContext

ITypeDescriptorContext,提供格式內容。

destinationType
Type

型別,表示要轉換成的型別。

傳回

Boolean

如果這個轉換子可以執行轉換,則為 true,否則為 false

備註

使用內容參數來擷取叫用此轉換器之環境的其他資訊。 此參數可以是 null ,因此請一律檢查它。 甚至,內容物件上的屬性可能會傳回 null

適用於