LinkDemand Error

C

Cristian Anca

Hello,

I have a class that implements the interface IMessageFilter. When I run
FxCop on this class the following error appears:
The virtual method IMessageFilter.PreFilterMessage(Message&):Boolean
defined by type 'System.Windows.Forms. IMessageFilter' and its override
MessageFilter.PreFilterMessage(Message&):Boolean do not have the same
LinkDemand status. Add a LinkDemand where required.

I have placed the folloing code:
[CustomPermissionAttribute(SecurityAction.LinkDemand)] but still have
the same error. I tried with the
[CustomPermissionAttribute(SecurityAction.LinkDemand),
Unrestricted=true] and also with Unrestricted=false but nothing, same
error.

Can someone tell me what I do wrong.

Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top