AmazonScrape.DoubleRangeConverter.ConvertTo C# (CSharp) Method

ConvertTo() public method

public ConvertTo ( System context, System culture, object value, Type destinationType ) : object
context System
culture System
value object
destinationType System.Type
return object
        public override object ConvertTo(
         System.ComponentModel.ITypeDescriptorContext context,
          System.Globalization.CultureInfo culture, object value, Type destinationType)
        {
            if (destinationType == null)
                throw new ArgumentNullException("destinationType");

            DoubleRange range = value as DoubleRange;

            if (range != null)
                if (this.CanConvertTo(context, destinationType))
                    return range.ToString();

            return base.ConvertTo(context, culture, value, destinationType);
        }