Answer: using System.IO;
string file_contents;
using (StreamReader sr = new StreamReader("C:\\rpt.txt"))
{
file_contents = sr.ReadLine();
}
if (!String.IsNullOrEmpty(file_contents))
{
MessageBox.Show(file_contents);
}
Asked In: Many Interviews |
Alert Moderator