471,610 Members | 1,316 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,610 software developers and data experts.

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

in C# fastest way to convert a string into a MemoryStream
Nov 12 '05 #1
1 7640
new MemoryStream(Encoding.UTF8.GetBytes(yourString));

But if the string is very large you may want to call
Encoding.UTF8.GetEncoder() then encoding the string in buffer chunks and
write those chunks to the memory stream.

"Daniel" <so*******************@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
in C# fastest way to convert a string into a MemoryStream

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Nathan | last post: by
15 posts views Thread by Buddy Home | last post: by
24 posts views Thread by ThunderMusic | last post: by
reply views Thread by =?Utf-8?B?cm9uZSBtYXRpYXM=?= | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by MichaelMortimer | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.