Condividi tramite


Metodo BaseEnumStringConverter<T>.CanConvertFrom (ITypeDescriptorContext, Type)

Ottiene un valore che indica se questo convertitore può convertire un oggetto nel tipo di origine specificata in una stringa che utilizza il contesto specificato.

Spazio dei nomi:  Microsoft.VisualStudio.TestTools.WebTesting
Assembly:  Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)

Sintassi

'Dichiarazione
Public Overrides Function CanConvertFrom ( _
    context As ITypeDescriptorContext, _
    sourceType As Type _
) As Boolean
public override bool CanConvertFrom(
    ITypeDescriptorContext context,
    Type sourceType
)
public:
virtual bool CanConvertFrom(
    ITypeDescriptorContext^ context, 
    Type^ sourceType
) override
abstract CanConvertFrom : 
        context:ITypeDescriptorContext * 
        sourceType:Type -> bool 
override CanConvertFrom : 
        context:ITypeDescriptorContext * 
        sourceType:Type -> bool 
public override function CanConvertFrom(
    context : ITypeDescriptorContext, 
    sourceType : Type
) : boolean

Parametri

  • sourceType
    Tipo: System.Type
    In Type che rappresenta il tipo da cui si desidera convertire.

Valore restituito

Tipo: System.Boolean
true se questo convertitore può eseguire la conversione, in caso contrario, false.

Sicurezza di .NET Framework

Vedere anche

Riferimenti

BaseEnumStringConverter<T> Classe

Overload CanConvertFrom

Spazio dei nomi Microsoft.VisualStudio.TestTools.WebTesting