public bool ValidateParams(string[] cmd) { if ((cmd.Length != ParameterCount && !VariableParms) || (VariableParms && (cmd.Length < ParameterCount))) { CommandResult.AddErrorMessage("Invalid params. Number should be '" + ParameterCount + "'"); return(false); } return(true); }