[Mono-devel-list] Re: System.XML warning
john.luke at gmail.com
Thu Mar 17 12:14:03 EST 2005
On Thu, 2005-03-17 at 16:30 +0000, Marek Safar wrote:
> >mcs supports the C# 2 pragma stuff to disable/restore warnings
> >on a given section of code. (It is possible this is not in the 1.0.X
> >branch yet, I didn't check)
> >You can do it like this:
> >#pragma warning disable 0169
> >string bar;
> >#pragma warning restore 0169
> Yes, you can use this syntax with 1.1.x mcs and csc 2.0.
> But I don't recommend it, when you have private field, method, .. and
> they are never used.
> Why they are there ? It only confuses other developers. When this method
> is "too early" implementation of some a new feature,
> which I think is very rare why not simply comment this code either using
> #if or as ordinary comment
> I guess, the rest should be deleted.
I didn't mean to imply doing the above was a good idea, just that it can
be done like that. I'll leave it up to individuals to decide where and
how to use it.
More information about the Mono-devel-list