Unhandled exception. System.FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength)
at System.Convert.FromBase64String(String s)
at SpiderDemo.Program.Main(String[] args)
使用C#解码Base64时,偶遇报错,时有时无,最后调试发现,base64字符串末尾含有\0……
Convert.FromBase64String(base64string..Trim('\0'))