Home All Groups Group Topic Archive Search About

in C# fastest way to convert a string into a MemoryStream

Author
2 Aug 2005 11:01 PM
Daniel
in C# fastest way to convert a string into a MemoryStream

Author
4 Aug 2005 8:23 AM
Raffaele Rialdi [MVP]
Daniel wrote:
> in C# fastest way to convert a string into a MemoryStream

If it's sufficient for you obtaining a stream, you can use StringReader
class:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemiostringreaderclasstopic.asp
otherwise you can read the stringreader and write a memorystream.

--
Raffaele Rialdi
Microsoft .NET MVP http://mvp.support.microsoft.com -
http://italy.mvps.org UGIdotNET - User Group Italiano .NET
http://www.ugidotnet.org Weblog: http://blogs.ugidotnet.org/raffaele