string filePath = @”c:\Sample.txt”;
string line,SNo=” “;
if (File.Exists(filePath))
{
StreamReader file = null;
try
{
file = new StreamReader(filePath);
while ((line = file.ReadLine()) != null)
{
Console.WriteLine(line);
//SNo = line.Substring(0,3);
}
}
finally
{
if (file != null)
file.Close();
}
}
Image may be NSFW.
Clik here to view.

Clik here to view.
