System.Xml.XmlConvert.VerifyWhitespace C# (CSharp) Méthode

VerifyWhitespace() public static méthode

public static VerifyWhitespace ( string content ) : string
content string
Résultat string
        public static string VerifyWhitespace(string content)
        {
            if (content == null)
            {
                throw new ArgumentNullException(nameof(content));
            }

            // returns the position of invalid character or -1
            int pos = s_xmlCharType.IsOnlyWhitespaceWithPos(content);
            if (pos != -1)
            {
                throw new XmlException(SR.Xml_InvalidWhitespaceCharacter, XmlException.BuildCharExceptionArgs(content, pos), 0, pos + 1);
            }
            return content;
        }