you're way is a little long.
Code:
public static void Main()
{
ReadFromFile("c:\\MyTextFile.txt");
}
static void ReadFromFile(string filename)
{
StreamReader SR;
string S;
SR=File.OpenText(filename);
S=SR.ReadLine();
while(S!=null)
{
Console.WriteLine(S);
S=SR.ReadLine();
}
SR.Close();
}
and to top it off you never use
Code:
StringBuilder output = new StringBuilder();
in your method
Wesley