public static void AgainstEmptyString(string argumentValue, string argumentName) { if ((argumentValue != null) && (argumentValue.Length == 0)) { throw new ArgumentException("String cannot be empty.", argumentName); } }