[Mono-list] Suppressing "The private method `xxxxx' is never used" warnings
Nikki Locke
nikki at trumphurst.com
Fri Nov 3 13:00:26 EST 2006
Loren Bandiera wrote:
> You could try something like this:
>
> #pragma warning disable 169
> public class MyClass
> {
> ...
> }
> #pragma warning restore 169
>
> On Wed, 2006-10-18 at 18:15 +0100, Nikki Locke wrote:
> > I have a lot of private methods in a set of state machine classes that
> > are
> > only called using Reflection. This gives rise to a lot of "The
> > private
> > method `xxxxx' is never used" warnings when compiling under Mono.
> >
> > Is there are way (using an Attribute, probably) to flag these methods
> > as
> > called from Reflection, so the compiler doesn't give these warnings?
Thanks for the suggestion (and sorry for the long delay in replying).
Unfortunately, I find #pragma will not compile in Windows .Net.
--
Nikki Locke, Trumphurst Ltd. PC & Unix consultancy & programming
http://www.trumphurst.com/
More information about the Mono-list
mailing list