Normally I would just use:
HttpContext.Current.Server.UrlEncode(\"url\");
But since this is a console application, HttpContext.Curren
HttpContext.Curren
You'll want to use
System.Web.HttpUtility.urlencode("url")
Make sure you have system.web as one of the references in your project. I don't think it's included as a reference by default in console applications.