XmlLanguageConverter.CanConvertTo(ITypeDescriptorContext, Type) XmlLanguageConverter.CanConvertTo(ITypeDescriptorContext, Type) XmlLanguageConverter.CanConvertTo(ITypeDescriptorContext, Type) XmlLanguageConverter.CanConvertTo(ITypeDescriptorContext, Type) Method

定義

傳回值,指出這個轉換子是否可以將物件轉換成指定的型別。Returns whether this converter can convert the object to the specified type.

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

參數

typeDescriptorContext
ITypeDescriptorContext ITypeDescriptorContext ITypeDescriptorContext ITypeDescriptorContext

提供格式內容的 ITypeDescriptorContextAn ITypeDescriptorContext that provides a format context.

destinationType
Type Type Type Type

要轉換的目標型別。The type you want to convert to.

傳回

如果這個轉換子可以執行轉換,則為 true,否則為 falsetrue if this converter can perform the conversion; otherwise, false.

備註

true這個方法InstanceDescriptor 會傳回destinationType的或的。String destinationTypeThis method returns true for destinationType of InstanceDescriptor or destinationType of String.

適用於

另請參閱