In C# I have System.Security.SecurityElement.Escape(url), but in my BackgroundTask I not access this. I try the:
url= url.Replace("&", "&").Replace("<", "<").Replace(">", ">").Replace("\"", """).Replace("'", "'");
but this way is very very boring. Have any way to do this with native methods? like the first I write.
UrlEncode not util for me, only I need escape url.
(I am based on this link: http://weblogs.sqlteam.com/mladenp/archive/2008/10/21/Different-ways-how-to-escape-an-XML-string-in-C.aspx )
Any idea?
Thanks in advance