Due to testing and time measuring I have to write some kind of log into an existing C# Winforms project.
I want to minimize change to the application, so I'm limiting my question to replacing text by counting numbers:
I want to pass a line:
Log.WriteLine(position)
many times in the code and then replace "position" with numbers starting from 1 to n
in turn.
I can't use a counter in this case because of many loops I don´t get the right position.