filestream_readtext.htm
 

using System;
using System.IO;
using System.Text;
//csc filestream_readfile.cs
//C:\MySharp\file_stream\MyTest.txt
namespace file_stream
{
public class read_to
{
public static void process(string s1)
{

TextReader t = new StreamReader(s1);
Console.Write(t.ReadLine());
t.Close();
}
}
class Test
{
static void Main()
{

Console.Write("enter file and path :");
string str1 = Console.ReadLine();
read_to.process(str1);
Console.ReadLine();
}

}
}