我在读取块中的内存流时遇到了一些麻烦。
Dim ByteBuffer(4096) As Byte
While ProcessedBytes < FileLength
BytesRead = MemoryStream.Read(ByteBuffer, 0, 4096)
'Write the buffer to an output stream
ProcessedBytes += BytesRead
End While
'MemoryStream.Read(ByteBuffer, 0, 4096)' 总是返回零。我查看了“MemoryStream.Length”,流中肯定有一些字节。