public static bool CanConvert(this Type from, Type to) { if (from == null) { throw new ArgumentNullException(nameof(from)); } if (to == null) { throw new ArgumentNullException(nameof(to)); } return((from == to) || (to == typeof(object)) || (to == typeof(string)) || from.IsCastableTo(to) || (GenericNumberUtility.IsNumber(from) && GenericNumberUtility.IsNumber(to)) || (ConvertUtility.GetCastDelegate(from, to) != null)); }