I would like to know how to convert a stream to a byte.
I find this code, but in my case it does not work:
var memoryStream = new MemoryStream();
paramFile.CopyTo(memoryStream);
byte[] myBynary = memoryStream.ToArray();
myBinary = memoryStream.ToArray();
But in my case, in the line paramFile.CopyTo(memoryStream) it happens nothing, no exception, the application still works, but the code not continue with the next line.
Thanks.