Posted By

jimfred on 01/29/10


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Priestd09


#if defined( DEBUG) in C# - use [Conditional("DEBUG")]


 / Published in: C#
 

URL: http://bytes.com/topic/c-sharp/answers/237540-conditional-debug-if-debug

System.Diagnostics.Debug uses [Conditional("DEBUG")].

ILDASM.EXE shows that no code is generated.

  1. [Conditional("DEBUG")]
  2. private static void debugtest()
  3. {
  4. ...
  5. }

Report this snippet  

You need to login to post a comment.