CSharp examples for System:String Base
base63 url decode
using System;/*from ww w.jav a 2s . com*/ public class Main{ public static byte[] base64urldecode(string arg) { string s = arg; s = s.Replace('-', '+'); // 62nd char of encoding s = s.Replace('_', '/'); // 63rd char of encoding switch (s.Length % 4) // Pad with trailing '='s { case 0: break; // No pad chars in this case case 2: s += "=="; break; // Two pad chars case 3: s += "="; break; // One pad char default: throw new System.Exception("Illegal base64url string!"); } return Convert.FromBase64String(s); // Standard base64 decoder } }