我得到这个错误ReadTimeout转换字节数组到流
ReadTimeout = '((System.IO.Stream)(ms)).ReadTimeout' threw an exception of type 'System.InvalidOperationException'.
我的代码时引发了异常。
byte[] imageBytes = Convert.FromBase64String(img);
MemoryStream ms = new MemoryStream(imageBytes, 0, imageBytes.Length); //Problem generates here//
谢谢..
唯一的例外是不是在您指定的行抛出。 ((System.IO.Stream)(ms))。ReadTimeout'抛出一个异常... –
只有在调试时才会发生异常吗?它会抛出一个异常,因为'MemoryStream'不支持超时,但它不应该影响你的程序(根据你发布的两行代码)。 –