Pages

Wednesday, December 18, 2013

Converting String to Stream

Most of us has faced at some point of time thinking how to convert a string to Stream object.

In fact its easy

string xmlString="<writeacode>Blogs</writeacode>";

Stream xmlStream= new MemoryStream(Encoding.UTF8.GetBytes(xmlString);

Thats it!

No comments:

Post a Comment