#else
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

#else

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

#else

Remarks

#endif must be the next preprocessor directive after #else.

Example

See #if for an example of how to use #else.

See Also

C# Preprocessor Directives

Show:
© 2016 Microsoft