コード例 #1
0
 public static bool TryConvertOrCast <T>(object initialValue, CultureInfo culture, out T convertedValue)
 {
     return(MiscellaneousUtils.TryAction <T>(() => {
         object obj;
         ConvertUtils.TryConvertOrCast(initialValue, CultureInfo.CurrentCulture, typeof(T), out obj);
         return (T)obj;
     }, out convertedValue));
 }
コード例 #2
0
 public static bool TryConvertOrCast <T>(object initialValue, out T convertedValue)
 {
     return(ConvertUtils.TryConvertOrCast <T>(initialValue, CultureInfo.get_CurrentCulture(), out convertedValue));
 }