url encode C# code example
Example 1: swift url encode string
var urlString = originalString.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
Example 2: c# string to uri
Uri myUri = new Uri("http://www.contoso.com/");
var urlString = originalString.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
Uri myUri = new Uri("http://www.contoso.com/");