internal static void ValidateElement(SecurityElement elem, IPermission perm)
        {
            if (elem == null)
            {
                throw new ArgumentNullException("elem");
            }
            if (!XMLUtil.IsPermissionElement(perm, elem))
            {
                throw new ArgumentException(Environment.GetResourceString("Argument_NotAPermissionElement"));
            }
            string str = elem.Attribute("version");

            if (str != null && !str.Equals("1"))
            {
                throw new ArgumentException(Environment.GetResourceString("Argument_InvalidXMLBadVersion"));
            }
        }
        static internal void ValidateElement(SecurityElement elem, IPermission perm)
        {
            if (elem == null)
            {
                throw new ArgumentNullException("elem");
            }
            Contract.EndContractBlock();

            if (!XMLUtil.IsPermissionElement(perm, elem))
            {
                throw new ArgumentException(Environment.GetResourceString("Argument_NotAPermissionElement"));
            }

            String version = elem.Attribute("version");

            if (version != null && !version.Equals("1"))
            {
                throw new ArgumentException(Environment.GetResourceString("Argument_InvalidXMLBadVersion"));
            }
        }