我想在C#中实现Base64 URL安全编码.在Java中,我们有一个公共Codec库,它为我提供了一个URL安全编码字符串.如何使用C#实现相同的目标?
byte[] toEncodeAsBytes = System.Text.ASCIIEncoding.ASCII.GetBytes("StringToEncode");
string returnValue = System.Convert.ToBase64String(toEncodeAsBytes);
Run Code Online (Sandbox Code Playgroud)
上面的代码将它转换为Base64,但它填充==.有没有办法实现URL安全编码?