System.Xml.XmlAutoDetectWriter.IsHtmlTag C# (CSharp) Méthode

IsHtmlTag() private static méthode

Return true if "tagName" == "html" (case-insensitive).
private static IsHtmlTag ( string tagName ) : bool
tagName string
Résultat bool
        private static bool IsHtmlTag(string tagName) {
            if (tagName.Length != 4)
                return false;

            if (tagName[0] != 'H' && tagName[0] != 'h')
                return false;

            if (tagName[1] != 'T' && tagName[1] != 't')
                return false;

            if (tagName[2] != 'M' && tagName[2] != 'm')
                return false;

            if (tagName[3] != 'L' && tagName[3] != 'l')
                return false;

            return true;
        }