ColumnHeaderConverter.CanConvertTo(ITypeDescriptorContext, Type) 方法

定義

回傳一個值,表示是否 ColumnHeaderConverter 能在指定的上下文下將 a 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

提供格式上下文的A ITypeDescriptorContext

destinationType
Type

一個代表要轉換成的型別。

傳回

true如果這個轉換器能執行轉換;否則,。 false

備註

使用上下文參數來擷取關於此轉換器所呼叫環境的額外資訊。 這個參數可以是 null,所以一定要檢查。 此外,上下文物件上的屬性也可以回傳 null

適用於