I am trying to populate a field in my text file and it needs the number of records in the text file, meaning the lines.
each time I try to use the code below , I get an error saying that the file is being used as I am writting other records to it .
int count = 0;
TextReader reader1 = new StreamReader(@"\sqlfile.txt");
while ((line = reader1.ReadLine()) != null)