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
?
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.