Dhanak,
I would handle it a different way. Basically, I would have a class with
static methods that will perofrm your debugging (or logging). Then, on
those methods, I would apply the Conditional attribute in the
System.Diagnostics namespace to those methods. When in debug mode (which
you should be able to specify in the web.config file for hte app), the
methods will be compiled in. When not in debug mode, calls to those methods
with the attribute set will not be made.
For the attribute, you will want to pass the string "DEBUG", as that
corresponds to the debug flag which is set for debug builds.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Dhanak" <rdhanak@-NOSPAM-freeMarkets.com> wrote in message
news:un**************@TK2MSFTNGP09.phx.gbl...
I have around 1000 aspx files that contains standard lines intended
for debuggibg.Now before we put these to production we need to remove
these lines.
We r currently using StreamReader and Regex Classes of .Net to do this.
Can somebody suggest any solution which can improve performance and
accuracy?
---
Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/