At the moment I have an ArrayList containing EPL printer commands.
In each command it has a line position.
eg/
myList.Add(string.Format(CultureInfo.InvariantCulture, "A26," + YPos + ,0,4,1,1,N,\"Date Printed : {0}\"", DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss")));
myList.Add(string.Format(CultureInfo.InvariantCulture, "A26," + YPos + ",0,4,1,1,N,\"Test Data : {0}\"", "BOO"));
The YPos variable gets 60 added to it after each entry.
At the end of the arraylist getting populated I work through the collection and at every 23 lines I need to add a new entry with blank data
eg/
sb.Add(string.Format(CultureInfo.InvariantCulture, "A26," + YPos + ",0,4,1,1,N,\"{0}\"", ""));
My problem is the YPos value needs to be in sequence and for all entries after it.
At the moment the entries appear at 23 lines apart but the YPos value is the final YPos value with 60 added to it so although the blank lines are 23 lines apart in my ArrayList they actually get printed on the end as my YPos has the greater values.
I thought about using a List or Dictionary to use the incrementers as key identifiers but I would still have to replace all string entries at the end to the correct value so not sure that is the greatest approach.