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:
18.223.168.2