1. First, we will introduce the most commonly used: # region and # endregion. This command is used to mark a piece of code as a block with a given name. As follows:
# Region helloint I = 1; string STR = "hello"; # endregion
2. # define and # UNDEF. (It must start with the C # source file)
# Define hello
It tells the compiler that there is a given name symbol, similar to declaring a variable, but there is no real value, just exist.
# UNDEF hello
Opposite to # define, This is a definition for deleting symbols. It seems that the system already exists (# define Debug) by default. If it is not used, # UNDEF debug. # define itself does not make sense. It must be used with other pre-processing commands (especially # If) to display powerful functions.
3. # If, # Elif, # else, endif. This attachment is one.
4. # warning and # error
When the compiler encounters this preprocessing instruction, it will generate a warning or error.
# If debug # warning "wwarning" // warning # error "error" // Error # endif
5. There are # Line and # pragma.