string fileName="e:\\test.txt";
System.IO.StreamWriter sw=new System.IO.StreamWriter(fileName);
sw.WriteLine(System.DateTime.Now);
sw.Close();
if(System.IO.File.Exists(fileName))
{
System.IO.StreamReader sr=new System.IO.StreamReader(fileName);
String line=null;
while((line=sr.ReadLine())!=null)
{
System.Console.WriteLine(line);
}
sr.Close();
}