Esempio n. 1
0
        /// <include file='doc\XmlReader.uex' path='docs/doc[@for="XmlReader.IsName"]/*' />
        /// <devdoc>
        ///    <para>[To be supplied.]</para>
        /// </devdoc>
        public static bool IsName(string str)
        {
            if (str == String.Empty || !XmlCharType.IsStartNameChar(str[0]))
            {
                return(false);
            }
            int i = str.Length - 1;

            while (i > 0)
            {
                if (XmlCharType.IsNameChar(str[i]))
                {
                    i--;
                }
                else
                {
                    return(false);
                }
            }
            return(true);
        }