public static bool IsNCName(string str) { if (str.Length == 0) { return(false); } if (!XmlChar.IsFirstNameChar((int)str[0])) { return(false); } for (int i = 0; i < str.Length; i++) { if (!XmlChar.IsNCNameChar((int)str[i])) { return(false); } } return(true); }
public static bool IsNCNameChar(char ch) { return(XmlChar.IsNCNameChar(ch)); }