Partilhar via


#else (C# Reference)

#else lets you create a compound conditional directive, so that, if none of the expressions in the preceding #if or (optional) #elif directives to true, the compiler will evaluate all code between #else and the subsequent #endif.

Remarks

#endif must be the next preprocessor directive after #else. See #if for an example of how to use #else.

See Also

Reference

C# Preprocessor Directives

Concepts

C# Programming Guide

Other Resources

C# Reference