Debug vs Trace in C#

Posted by koumides on Stack Overflow See other posts from Stack Overflow or by koumides
Published on 2011-02-17T15:19:29Z Indexed on 2011/02/17 15:25 UTC
Read the original article Hit count: 215

Filed under:
|

All,

As I understand statements like Debug.WriteLine() will not stay in the code in the Release build. On the other hand Trace.WriteLine() will stay in the code in the Release build. What is controling this behaviour? Does the C# compiler ignores everything from the System.Diagnostics.Debug class when the DEBUG is defined?

I am just trying to understand the internals of C# and just curious.

Thanks,

MK

© Stack Overflow or respective owner

Related posts about c#

Related posts about debugging