use a file stream just in memory
-
i need a file stream object but just in memory. That is i dont want a StreamWriter that write a file on the HD or a StreamReader that read one from the HD, i need: Stream mstream but i can't becouse i can inistialize it with: new Stream(); so how can i do?
-
i need a file stream object but just in memory. That is i dont want a StreamWriter that write a file on the HD or a StreamReader that read one from the HD, i need: Stream mstream but i can't becouse i can inistialize it with: new Stream(); so how can i do?
Use the System.IO.MemoryStream[^] class.
StreamReader
accepts any stream, so you can pass a MemoryStream instead of the FileStream. Regards Senthil _____________________________ My Blog | My Articles | WinMacro -- modified at 7:54 Friday 21st October, 2005 -
i need a file stream object but just in memory. That is i dont want a StreamWriter that write a file on the HD or a StreamReader that read one from the HD, i need: Stream mstream but i can't becouse i can inistialize it with: new Stream(); so how can i do?