How to get a MemoryStream from a Stream in .NET?

后端 未结 9 1076
天命终不由人
天命终不由人 2020-12-02 16:16

I have the following constructor method which opens a MemoryStream from a file path:

MemoryStream _ms;

public MyClass(string filePath)
{
    by         


        
9条回答
  •  再見小時候
    2020-12-02 17:05

    How do I copy the contents of one stream to another?

    see that. accept a stream and copy to memory. you should not use .Length for just Stream because it is not necessarily implemented in every concrete Stream.

提交回复
热议问题