Blkbam wrote:Close but no. StreamWriter/Reader both take either files or other streams. I need to put the text into a stream without creating a file.
blowdart wrote: Blkbam wrote: Close but no. StreamWriter/Reader both take either files or other streams. I need to put the text into a stream without creating a file.You mean a MemoryStream?
Blkbam wrote: Close but no. StreamWriter/Reader both take either files or other streams. I need to put the text into a stream without creating a file.
This is off the top of my head, but you should be able to do something like:
string s = "hello world";
MemoryStream m = new MemoryStream(System.Text.Encoding.Default.GetBytes(s));
Blkbam wrote:Stream s = new Stream();