Normally I would just use:
HttpContext.Current.Server.UrlEncode("url");
But since this is a console application, HttpContext.Current
is always going to be null
.
Is there another method that does the same thing that I could use?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…