There are some things which are seemingly simple but are difficult to get done for the first time at least. This is one of them.

The other day I had to get a Stream from the String I had. Though it was apparently easy, it took me quite a while to figure it out. Nevertheless here’s what I did:

MemoryStream myStream = new MemoryStream(ASCIIEncoding.Default.GetBytes("My String"));