void ValidatePath (string element, params string[] paths) { foreach (string path in paths) if (CheckPath (path)) return; throw new RemotingException ("Element " + element + " not allowed in this context"); }