Trace.WriteLine in release mode?

前端 未结 3 382
盖世英雄少女心
盖世英雄少女心 2021-01-07 22:01

Can I use Trace.WriteLine in release mode?

And what is the main difference between Trace.Write and Debug.Write?

3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-07 22:43

    The difference is in Release mode.

    Debug.Write will not be compiled into the code when the DEBUG symbol is not defined, i.e. compiling in Release mode.

    However, Trace.Write will be compiled in both Debug mode and Release mode.

提交回复
热议问题