[Mono-list] Re: PInvoke:TNG

Robert Deviasse rdeviasse@hotmail.com
Mon, 29 Oct 2001 10:37:55 -0500


>Too bad about that limitation.  However, my vote is to put in the
>/nowarn's anyway for these two. Right now they are just telling us
>that the class is not done, which the author already knows.  To
>others it's just confusing noise.
>
>And, yes...I think the word you are looking for
>is "Robustification" ;)

Instead of covering it up with command line switches, why not go the 
opposite route and make it explicit through C# attributes?

Sometimes a warning really isn't fixing anything (especially if it's 
prototype, in flux, or experimental code) and the workaround to remove the 
warning has other unfortunate side effects.

Annotating the class, function, or assembly with a line like:
[Pragma("NoWarn", "C0021")]

solves the problem in a more fine grained away and has the added benefits of 
allowing C# tools (optimizers, profilers, Purify-like programs, diagrammers) 
more information about what they can and can't do, as well as more 
information about how to display things.

It also allows you to have a "no warnings" policy and explicitly deal with 
exceptions on a case by case basis.



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp