System.Net.WebUtility.StringRequiresHtmlDecoding C# (CSharp) Method

StringRequiresHtmlDecoding() private static method

private static StringRequiresHtmlDecoding ( string s ) : bool
s string
return bool
        private static bool StringRequiresHtmlDecoding(string s)
        {
            // this string requires html decoding if it contains '&' or a surrogate character
            for (int i = 0; i < s.Length; i++)
            {
                char c = s[i];
                if (c == '&' || Char.IsSurrogate(c))
                {
                    return true;
                }
            }
            return false;
        }