publicvoid UrlEncodeTest()
{
string url ="C++ C#";
Console.WriteLine(HttpUtility.UrlEncode(url));//C%2b%2b+C%23
Console.WriteLine(HttpUtility.UrlPathEncode(url));//C++%20C#
Console.WriteLine(Uri.EscapeUriString(url));//C++%20C#
Console.WriteLine(Uri.EscapeDataString(url));//C%2B%2B%20C%23
}