title: Advance C# ReadLine() to next line in a function call
body: <p>In my C# app I'm trying to feed into ReadLine() a simple text document with 7 digit strings separated line by line. What I'm attempting to do is grab the next 7 digit string each time the function is called. Here's what I have so far:</p>
  
  <pre><code>string invoiceNumberFunc()
      {
          string path = @"C:\Users\sam\Documents\GCProg\testReadFile.txt";
          try
          {
              using (StreamReader sr = new StreamReader(path))
              {
                  invoiceNumber = sr.ReadLine();
  
              }
  
          }
          catch (Exception exp)
          {
              Console.WriteLine("The process failed: {0}", exp.ToString());
          }
         return invoiceNumber;
      }
  </code></pre>
  
  <p>How do I advance to the next line each time the invoiceNumberFunc() is called?</p>
  
  <p>Thanks in advance.</p>