Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
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.

#pragma (C# Reference)

Updated: July 2008

#pragma gives the compiler special instructions for the compilation of the file in which it appears. The instructions must be supported by the compiler. In other words, you cannot use #pragma to create custom preprocessing instructions. The Microsoft C# compiler supports the following two #pragma instructions:

#pragma warning (C# Reference)

#pragma checksum (C# Reference)

#pragma pragma-name pragma-arguments

pragma-name

The name of a recognized pragma.

pragma-arguments

Pragma-specific arguments.

Date

History

Reason

July 2008

Corrected text per customer suggestions.

Content bug fix.

Community Additions

ADD
Show:
© 2015 Microsoft