using System;using System.IO;using System.Text; namespace streamDemo{class Program{static void Main( string[] args ){string str= "I love my India"; /*convert string to stream*/byte[] byteArray = Encoding.ASCII.GetBytes( str);MemoryStream stream = new MemoryStream( byteArray ); /* convert stream to string*/StreamReader reader = new StreamReader( stream );string text = reader.ReadToEnd(); Console.WriteLine(str);Console.ReadLine();}}}

Hari BPosted Nov 3, 2015, 2:02 AM EST
Encoding get from where??
Dinkar ChavhanPosted Apr 20, 2011, 4:19 AM EDT
nice
Mayur GujrathiPosted Apr 20, 2011, 2:49 AM EDT
I think this is usually done in converting image am i right Ankit?