Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 15, 2009 11:24 AM by Rimbik
Participant
1206 Points
448 Posts
May 15, 2009 06:52 AM|LINK
hi cananyone tell me how to convert a string to stream?
All-Star
48619 Points
7957 Posts
MVP
May 15, 2009 08:01 AM|LINK
Hi, Stream s = new MemoryStream(ASCIIEncoding.Default.GetBytes("Avinash") OR http://www.csharp411.com/c-convert-string-to-stream-and-stream-to-string/
Contributor
2042 Points
345 Posts
May 15, 2009 08:05 AM|LINK
Hi
Assuming you want the string's stream encoded in UTF8:
string strVal ="asdasd"
System.IO.MemoryStream = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes( strVal));
Thanks
1359 Points
382 Posts
May 15, 2009 11:24 AM|LINK
Good Stuff @
http://www.csharp411.com/c-convert-string-to-stream-and-stream-to-string/
Soumen, India
pavankumarka...
Participant
1206 Points
448 Posts
how to convert a string to stream?
May 15, 2009 06:52 AM|LINK
hi cananyone tell me how to convert a string to stream?
qwe123kids
All-Star
48619 Points
7957 Posts
MVP
Re: how to convert a string to stream?
May 15, 2009 08:01 AM|LINK
Hi,
Stream s = new MemoryStream(ASCIIEncoding.Default.GetBytes("Avinash")
OR
http://www.csharp411.com/c-convert-string-to-stream-and-stream-to-string/
Avinash Tiwari
Remember to click “Mark as Answer” on the post, if it helps you.
alankarp
Contributor
2042 Points
345 Posts
Re: how to convert a string to stream?
May 15, 2009 08:05 AM|LINK
Hi
Assuming you want the string's stream encoded in UTF8:
string strVal ="asdasd"
System.IO.MemoryStream = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes( strVal));
Thanks
Profile
Rimbik
Participant
1359 Points
382 Posts
Re: how to convert a string to stream?
May 15, 2009 11:24 AM|LINK
Good Stuff @
http://www.csharp411.com/c-convert-string-to-stream-and-stream-to-string/
Soumen, India
Bal budhi Vidya dehu mohe,Harahu Kalesa Vikar
[My Site: WCF, My Site
and Silverlight site @ Silverlight version].