Share via


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

Gets a value that indicates whether this converter can convert an object in the given source type to a string that uses the specified context.

Namespace:  Microsoft.VisualStudio.TestTools.WebTesting
Assembly:  Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)

Syntax

'Declaration
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

Parameters

  • sourceType
    Type: System.Type
    A Type that represents the type from which you want to convert.

Return Value

Type: System.Boolean
true if this converter can perform the conversion; otherwise, false.

.NET Framework Security

See Also

Reference

BaseEnumStringConverter<T> Class

CanConvertFrom Overload

Microsoft.VisualStudio.TestTools.WebTesting Namespace