May 2010
Intermediate to advanced
1272 pages
61h 18m
English
Memory streams are special objects that act like file streams but that work in memory, providing the ability to manipulate binary data. The following code creates a MemoryStream with 2 Kbytes capacity and puts in a string:

To retrieve data you use a BinaryReader pointing to the MemoryStream as you saw in the paragraph for binary files. So, in this example, you can simply invoke ReadString as follows:

Read now
Unlock full access