System.ComponentModel.TimeSpanConverter.CanConvertFrom C# (CSharp) Method

CanConvertFrom() public method

Gets a value indicating whether this converter can convert an object in the given source type to a object using the specified context.

public CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool
context ITypeDescriptorContext
sourceType Type
return bool
        public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
        {
            return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);
        }