/// <summary> /// Converts the value to the given Type using the given CultureInfo and the <see cref="ConversionOptions">ConversionOptions</see>.<see cref="ConversionOptions.EnhancedTypicalValues">ConvertSpecialValues</see>. /// </summary> /// <typeparam name="T">The Type to which the given value is converted.</typeparam> /// <param name="value">The value which is converted.</param> /// <param name="culture">The CultureInfo to use as the current culture.</param> /// <returns>An Object instance of type <typeparamref name="T">T</typeparamref> whose value is equivalent to the given <paramref name="value">value</paramref>.</returns> public static T ConvertTo <T>(this object value, CultureInfo culture) { return(UniversalTypeConverter.ConvertTo <T>(value, culture)); }
/// <summary> /// Converts the value to the given Type using the given CultureInfo and the given <see cref="ConversionOptions">ConversionOptions</see>. /// </summary> /// <typeparam name="T">The Type to which the given value is converted.</typeparam> /// <param name="value">The value which is converted.</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>An Object instance of type <typeparamref name="T">T</typeparamref> whose value is equivalent to the given <paramref name="value">value</paramref>.</returns> public static T ConvertTo <T>(this object value, CultureInfo culture, ConversionOptions options) { return(UniversalTypeConverter.ConvertTo <T>(value, culture, options)); }
/// <summary> /// Converts the value to the given 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 which the given value is converted.</typeparam> /// <param name="value">The value which is converted.</param> /// <returns>An Object instance of type <typeparamref name="T">T</typeparamref> whose value is equivalent to the given <paramref name="value">value</paramref>.</returns> public static T ConvertTo <T>(this object value) { return(UniversalTypeConverter.ConvertTo <T>(value)); }