views:

51

answers:

1

when will we use memory stream?

+2  A: 

MemoryStream is kind of wrapper over byte[] that implements stream. You need it when you have class that reads from Stream or writes to it, but you need to get/set raw bytes.

Andrey
what are benefits or uses of memory stream over file stream?
Cup Of Life
@Cup Of Life you can't say that one has benefits over another, they are not equivalent. FileStream is for writing/reading files, MemoryStream is for `byte[]`
Andrey