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