views:

1032

answers:

3

In C++, there was a #pragma to output to the build log. Does one exist for Visual Studio 2005 C# ? And, does anyone know where an actual list of all the #pragma names can be found?

A: 

See the MSDN docs.

oefe
+2  A: 

According to the docs, pragmas must be supported by the compiler, and only two are currently supported: checksum and warning.

ctacke
+1  A: 

This link on msdn lists all the C# preprocessor directives and goes into detail about how they are used.

#if
#else 
#elif 
#endif 
#define 
#undef 
#warning 
#error 
#line 
#region 
#endregion 
#pragma 
#pragma warning 
#pragma checksum

Only warning and checksum are supported #pragma instructions for the C# compiler.

Nathan DeWitt