static void EnsureArgumentValueCount(string[] values, int maxArguments = 1) { if (values != null && values.Length > maxArguments) { throw new WarningException(string.Format("Could not parse command line parameter '{0}'.", values[1])); } }