using System . IO;
StreamReader vStreamReader = new StreamReader ( @"C:\temp\temp.txt", Encoding . Default);
string vText = "" ;
string vLine;
while ((vLine = vStreamReader . ReadLine()) != null )
{
// TODO
vText += vLine + "\r\n" ;
}
vStreamReader . Close();
StreamWriter vStreamWriter = new StreamWriter ( @"C:\temp\temp.txt" , false , Encoding . Default);
vStreamWriter . Write(vText);
vStreamWriter . Close();