By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,365 Members | 3,180 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,365 IT Pros & Developers. It's quick & easy.

Turn off compiler warnings in some specific spots in the code

P: n/a
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
Mar 22 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"Maxwell2006" <al******@newsgroup.nospam> wrote in message
news:eS**************@TK2MSFTNGP12.phx.gbl...
| 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.
Mar 22 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.