Turn off compiler warnings in some specific spots in the code

  • Thread starter Thread starter Maxwell2006
  • Start date Start date
M

Maxwell2006

Hi,

How can I turn off the compiler warnings in some specific spots in the code?

I don't want to turn off warnings for all project. I remember we had PRAGMA
feature in C++. Do we have the similar thing in C#?

Thank you,
Max
 
| Hi,
|
| How can I turn off the compiler warnings in some specific spots in the
code?
|
| I don't want to turn off warnings for all project. I remember we had
PRAGMA
| feature in C++. Do we have the similar thing in C#?
|
| Thank you,
| Max
|
|

C# v2 has it, check the C# programmer's reference

#pragma warning disable 3021, 1023
....
#pragma warning restore 3021

Willy.
 
Back
Top