public static decimal ToDecimal(object value, decimal def = 0) { if (value == null) { return(def); } return(TryParse.ToDecimal(value.ToString(), def)); }
public static DateTime ToDateTime(object value, DateTime?def = null) { if (value == null) { return((def == null) ? DateTime.MinValue : (DateTime)def); } return(TryParse.ToDateTime(value.ToString(), def)); }
public static Int32 ToInt32(object value, Int32 def = 0) { if (value == null) { return(def); } return(TryParse.ToInt32(value.ToString(), def)); }