Replace text in code with counting numbers
Posted
by Gpx
on Stack Overflow
See other posts from Stack Overflow
or by Gpx
Published on 2010-06-01T08:07:48Z
Indexed on
2010/06/01
8:13 UTC
Read the original article
Hit count: 188
Hi,
due to testing and time measuring i have to write some kind of log into existing c# winforms code in Visual Studio 2010. I want to hold the changes and the work very small so my question is about replacing text in my call by counting numbers.
Lets say i want to past a line like
Log.WriteLine(position)
many times in the code and then replace "position" with numbers starting from 1 to n in on turn.
I cant use a counter in this case because of many loops i don´t get the right position.
Thanks for any suggestions, Gpx
© Stack Overflow or respective owner