[Mono-list] Suppressing "The private method `xxxxx' is never used" warnings

Loren Bandiera lorenb at mmgsecurity.com
Wed Oct 18 13:38:51 EDT 2006


Hi,

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? 
-- 
Loren Bandiera <lorenb at mmgsecurity.com>
MMG Security, Inc.



More information about the Mono-list mailing list