Release built DLL with Debug.WriteLine

This question already has an answer here:

  • Debug.WriteLine in release build 4 answers

  • If you look at the code of the Debug.WriteLine method, you will see:

    [Conditional("DEBUG")]
    public static void WriteLine(string message, string category)
    {
        TraceInternal.WriteLine(message, category);
    }
    

    So basically, the call to this methods will only be compiled if you have set the DEBUG flag. Typically, when using the Debug configuration of your project.

    链接地址: http://www.djcxy.com/p/27964.html

    上一篇: SCardEstablishContext未在发布模式下设置上下文指针

    下一篇: 用Debug.WriteLine发布构建的DLL