Wrap your code into a method:
public static void MyConsoleWrite ( string msg )
{
Console.Writeline ( msg ) ;
}
Then you only have 1 place to comment out the code.
public static void MyConsoleWrite ( string msg )
{
//Console.Writeline ( msg ) ;
}
//this is the non debug version
public static void MyConsoleWrite ( string msg , bool alwaysWrite )
{
if ( alwaysWrite )
{
Console.Writeline ( msg ) ;
}
}
//this is the non debug version
public static void MyConsoleWrite ( string msg , bool alwaysWrite )
{
// if ( alwaysWrite ) //aka ignore the bool flag and always write it
out
//{
Console.Writeline ( msg ) ;
//}
}
"R Reyes" <R
Re***@discussions.microsoft.comwrote in message
news:FD**********************************@microsof t.com...
does this command use a lot of resources? should i comment them all out
before creating my .exe file? i use it a lot for debugging...
or, does it not make much of a difference?
thanks much