Need Text Replacement utility

  • Thread starter Thread starter Dhanak
  • Start date Start date
D

Dhanak

I have around 1000 aspx files that contains standard lines intended
for debugging purpose.Now before we put these to production we need to remove these lines from all files.

Instead of doing it manually, we would like to develop a small utility that can do this.

In a prototype of that utility, We r currently using StreamReader and Regex Classes of .Net to do this.

Can somebody suggest any other solution/Logics which can improve performance and accuracy of utility?
 
I have around 1000 aspx files that contains standard lines
intended for debugging purpose.Now before we put these to
production we need to remove these lines from all files.

Instead of doing it manually, we would like to develop a small
utility that can do this.

In a prototype of that utility, We r currently using
StreamReader and Regex Classes of .Net to do this.

Can somebody suggest any other solution/Logics which can improve
performance and accuracy of utility?

Dhanak,

Instead of removing the lines, you might consider wrapping the lines
of debugging code with a conditional directive like this:

#if DEBUG
... C# debugging code here ...
#endif

When building a release version of your application, simply remove
the DEBUG define from your project options. Then the debugging code
will not be included.


Hope this helps.

Chris.
 
Back
Top