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

/ Published in: C#
Save to your folder(s)

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

ILDASM.EXE shows that no code is generated.

Copy this code and paste it in your HTML
  1. [Conditional("DEBUG")]
  2. private static void debugtest()
  3. {
  4. ...
  5. }

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

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.