.NET     Console.WriteLine( "All Things .NET" );
.NET Nerd Blog Home
6.11.2002

 

Conditional Compilation


Since C# doesn't have a preprocessor, you have to do something a little different to include/exclude code based on a symbol definition.

[Conditional("DEBUG")]
public void DoSomething( )
{
Console.WriteLine( "debug something" );
}




Comments: Post a Comment

Powered by Blogger