Temporary disabling compiler warning

M

Marco Singer

Hi all,

how can I disable a special compiler warning (for example CS0162) within a
region of code? In C++ there is the "#pragma warning" compiler directive.
But I did not found any matching in C#.

Thanks

Marco
 
P

Philip Rieck

This functionality has been added to .net 2.0 (Whidbey / VS.NET 2005). For
today, you'll have to either shut off the warning per compilation unit
(module / assembly) with a command line switch, or live with the warning.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top