EventSetterHandlerConverter.CanConvertFrom Metodo

Definizione

Restituisce un valore che indica se questo convertitore può convertire un oggetto di un tipo in un oggetto Delegate.

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

Parametri

typeDescriptorContext
ITypeDescriptorContext

Oggetto ITypeDescriptorContext che fornisce un contesto di formato.

sourceType
Type

Oggetto Type che rappresenta il tipo da cui eseguire la conversione.

Restituisce

true se il convertitore può eseguire la conversione. In caso contrario, false.

Commenti

Questo metodo restituisce true solo quando sourceType è un String tipo. Tutti gli altri sourceType tipi restituiscono false.

Si applica a