I am fetching the data using
StreamReader read = new StreamReader(@"//text file path");
string line = read.ReadLine();
if more than one line is present in the text file then use this
string line = read.ReadToEnd();
if i want to use more than one lines from the file i am using the split function and then storing it into an array
string[] datalines = line.Split(new char[] { '\n' });