public static CultureInfo[] GetCultures(CultureTypes types) { return(Safe.Run(() => CultureInfo.GetCultures(types), new CultureInfo[0])); }
public static T Value <T>(int i) { return(Safe.Run(() => (T)Value(typeof(T), i), default(T))); }
public static RegionInfo ToRegionInfo(CultureInfo info) { return(info is null ? null : Safe.Run(() => new RegionInfo(info.LCID), null)); }
public static int Count(Type type) { return(Safe.Run(() => Enum.GetValues(type).Length, -1)); }