C# Uri EscapeUriString
Description
Uri EscapeUriString
converts a URI string to its escaped
representation.
Syntax
Uri.EscapeUriString
has the following syntax.
public static string EscapeUriString(
string stringToEscape
)
Parameters
Uri.EscapeUriString
has the following parameters.
stringToEscape
- The string to escape.
Returns
Uri.EscapeUriString
method returns A String that contains the escaped representation of stringToEscape.
Example
//from w w w.j ava2 s . c o m
using System;
public class MainClass{
public static void Main(String[] argv){
Console.WriteLine(Uri.EscapeUriString("http://java2s.com/a b.htm"));
}
}
The code above generates the following result.