VisualBasicSettingsConverter.CanConvertFrom(ITypeDescriptorContext, Type) VisualBasicSettingsConverter.CanConvertFrom(ITypeDescriptorContext, Type) VisualBasicSettingsConverter.CanConvertFrom(ITypeDescriptorContext, Type) VisualBasicSettingsConverter.CanConvertFrom(ITypeDescriptorContext, Type) Method

定義

判斷指定型別的物件是否可以轉換成 VisualBasicSettings 執行個體。Determines whether an object of the specified type can be converted to a VisualBasicSettings instance.

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

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

參數

context
ITypeDescriptorContext ITypeDescriptorContext ITypeDescriptorContext ITypeDescriptorContext

用於轉換的內容資訊。Context information that is used for conversion.

sourceType
Type Type Type Type

要轉換的來源型別。The type to convert from.

傳回

如果可以從指定的型別轉換,則為 true,否則為 falsetrue if the specified type can be converted from; otherwise, false.

備註

如果sourceType true是, 則這個方法會傳回, 否則會藉由呼叫基類方法CanConvertFrom進行判斷。 StringIf sourceType is a String, this method returns true; otherwise, the determination is made by calling the base class method CanConvertFrom.

適用於