Preprocessor directives across different files in C#

后端 未结 4 1670
我在风中等你
我在风中等你 2020-12-06 11:00

I know that I can use preprocessor directives in C# to enable/disable compilation of some part of code.

If I define a directive in the same file, it wor

4条回答
  •  半阙折子戏
    2020-12-06 11:30

    In your .csproj there is a section:

    
    
      
        TRACE;DEBUG;LINQ
      
    
    

    If you want extra preprocessors you can add them there.

    Or via the properties of the project which will add them there automatically for you. In properties under the Build tab.

提交回复
热议问题