diff --git a/Implab/Safe.cs b/Implab/Safe.cs --- a/Implab/Safe.cs +++ b/Implab/Safe.cs @@ -13,12 +13,17 @@ namespace Implab if (rx == null) throw new ArgumentNullException("rx"); if (!rx.IsMatch(param)) - throw new ArgumentException(String.Format("A prameter value must match {0}", rx), name); + throw new ArgumentException(String.Format("The prameter value must match {0}", rx), name); } public static void ArgumentNotEmpty(string param, string name) { if (String.IsNullOrEmpty(param)) - throw new ArgumentException("A parameter can't be empty", name); + throw new ArgumentException("The parameter can't be empty", name); + } + + public static void ArgumentNotEmpty(T[] param, string name) { + if (param == null || param.Length == 0) + throw new ArgumentException("The array must be not emty"); } public static void ArgumentNotNull(object param, string name) {