C # tutorial C # pre-processing command [original]

Source: Internet
Author: User

Next we will introduce a type of C # which will never be converted to executable.CodeBut it will affect the special commands in the compilation process. They are pre-processing commands.

Xiaotian: since it has never been executed, what is the purpose? Even though annotations are not executed, they can help us make the code easier to read.

Lao Tian: the so-called pre-processing commands are some commands used to control the compiler's work. For example, a pre-processing command is used to prohibit the compiler from compiling a part of the code. Take the Windows operating system, Visual Studio, and other software we use. They all have several versions. The biggest difference is the basic version and the flagship version. We can imagine that when we first developed these software, they were all developed according to the standards of the flagship version. But why did we find that there were not many functions in the basic edition when we used it? In fact, during development, the pre-processing command is used to mark all functions to be deleted in the basic edition.

In addition, all the C # preprocessing commands start with the symbol. In addition, the Preprocessor command must be the only command on the line.

Next we will introduce these commands that are not very common but useful in C.

This article is about the original series. For more information, see the source and author!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.