/// <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> /// <typeparam name="T">The Type to test.</typeparam> /// <param name="value">The value 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 <typeparamref name="T"/>; otherwise, false.</returns> public static bool CanConvertTo <T>(this object value, CultureInfo culture, ConversionOptions options) { return(UniversalTypeConverter.CanConvertTo <T>(value, 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> /// <typeparam name="T">The Type to test.</typeparam> /// <param name="value">The value to test.</param> /// <returns>true if <paramref name="value"/> can be converted to <typeparamref name="T"/>; otherwise, false.</returns> public static bool CanConvertTo <T>(this object value) { return(UniversalTypeConverter.CanConvertTo <T>(value)); }