public static bool TryConvert(object initialValue, CultureInfo culture, Type targetType, out object convertedValue) { bool result; try { convertedValue = ConvertUtils.Convert(initialValue, culture, targetType); result = true; } catch { convertedValue = null; result = false; } return(result); }
public static bool TryConvert(object initialValue, CultureInfo culture, Type targetType, out object convertedValue) { return(MiscellaneousUtils.TryAction <object>((Creator <object>)(() => ConvertUtils.Convert(initialValue, culture, targetType)), out convertedValue)); }
public static T Convert <T>(object initialValue, CultureInfo culture) { return((T)((object)ConvertUtils.Convert(initialValue, culture, typeof(T)))); }
public static T Convert <T>(object initialValue) { return(ConvertUtils.Convert <T>(initialValue, CultureInfo.get_CurrentCulture())); }