/// <summary> /// Determines whether the value can be converted to the specified type using the given CultureInfo and the given <see cref="ConversionOptions">ConversionOptions</see>. /// </summary> /// <param name="value">The value to test.</param> /// <param name="destinationType">The Type to test.</param> /// <param name="culture">The CultureInfo to use as the current culture.</param> /// <param name="options">The options which are used for conversion.</param> /// <returns>true if <paramref name="value"/> can be converted to <paramref name="destinationType"/>; otherwise, false.</returns> public static bool CanConvert(this object value, Type destinationType, CultureInfo culture, ConversionOptions options) { return(UniversalTypeConverter.CanConvert(value, destinationType, culture, options)); }
/// <summary> /// Determines whether the value can be converted to the specified type using the current CultureInfo and the <see cref="ConversionOptions">ConversionOptions</see>.<see cref="ConversionOptions.EnhancedTypicalValues">ConvertSpecialValues</see>. /// </summary> /// <param name="value">The value to test.</param> /// <param name="destinationType">The Type to test.</param> /// <returns>true if <paramref name="value"/> can be converted to <paramref name="destinationType"/>; otherwise, false.</returns> public static bool CanConvert(this object value, Type destinationType) { return(UniversalTypeConverter.CanConvert(value, destinationType)); }