Temporary disabling compiler warning

  • Thread starter Thread starter Marco Singer
  • Start date Start date
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
 
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.
 
Back
Top