Example #1
0
 public IEnumerable <NextString> Lines()
 {
     InitializeLineByLine();
     if (readToOutput)
     {
         try
         {
             for (NextString nextString = ReturnNextString(); nextString != null; nextString = ReturnNextString())
             {
                 Log(string.Format("Read line {0}: {1}", nextString.LineNumber, nextString.LineContents));
                 yield return(nextString);
             }
         }
         finally
         {
             CleanUp();
         }
     }
 }
Example #2
0
 static void Main()
 {
     (4 - NextString.Count(x => x == '-') * 2).WriteLine();
 }