Home  >  Article  >  Backend Development  >  Simple record of C# conditional compilation (detailed explanation with pictures and text)

Simple record of C# conditional compilation (detailed explanation with pictures and text)

怪我咯
怪我咯Original
2017-04-01 11:37:171640browse

Conditional compilation is something that C# has more than Java, but after I asked my seniors for advice, they all said that conditional compilation is not often used in actual project development. The following is just a record of the steps. , friends in need can refer to it.

Step one: Create a new solution configuration in the configuration manager

# #Step 2: Define conditional compilation symbols:

Step 3: Use customized conditional compilation in the code


#if CustomDebug
Console.WriteLine("dsads");
#endif



The above is the detailed content of Simple record of C# conditional compilation (detailed explanation with pictures and text). For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn