C# using streams

2019-01-16 02:51发布

Streams are kind of mysterious to me. I don't know when to use which stream and how to use them. Can someone explain to me how streams are used?

If I understand correctly, there are three stream types:

  • stream
  • read stream
  • write stream

Is this correct? And, for example, what is the difference between a Memorystream and a FileStream?

标签: c# stream
7条回答
贪生不怕死
2楼-- · 2019-01-16 03:22

Streams are good for dealing with large amounts of data. When it's impractical to load all the data into memory at the same time, you can open it as a stream and work with small chunks of it.

查看更多
登录 后发表回答