Counting lines of code to print
Hello, I am currently working on an assignment where we are asked to use c# code to read student records from a file: StudentNo,Subject and mark. the tricky part is that for every line of code we print we should count and "print" on a new page when the line count reaches 60...anyone who can help, even if its just the logic in pseudocode il appreciate it

VulpesRank #55 · 29.2K reputationPosted Aug 10, 2011, 12:16 PM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Aug 10, 2011, 2:25 PM EDT
Note that the assignment is for doing something that programmers in the past would do very often, nearly every day. I assume that your iinstructor is as old as I (and maybe Vulpes) and is still using assignments from many years ago.
Avuya MxoliRank #7,940 · 231 reputationPosted Aug 11, 2011, 6:11 AM EDT
VulpesRank #55 · 29.2K reputationPosted Aug 11, 2011, 6:33 AM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Aug 11, 2011, 11:45 AM EDT
int count = 0;
using (StreamReader sr = new StreamReader("ncedisa.txt"))
{
while ((line = sr.ReadLine()) != null)
{
Console.WriteLine(line);
count++;
if (count == 60)
{
count = 0;
Console.Write("\nPress any key to read next page");
// pause to read page
Console.ReadKey();
Console.Clear();
}
}
}
VulpesRank #55 · 29.2K reputationPosted Aug 11, 2011, 12:10 PM EDT
Sam HobbsRank #107 · 20.5K reputationPosted Aug 11, 2011, 12:41 PM EDT