The requested page is not available for the requested platform. You are viewing the content for Default platform.

Delegate cannot be marked static

CodeRush Classic shows the Delegate cannot be marked static code issue if a delegate is marked static.


Remove the static keyword from the delegate declaration.


Highlights the delegate declaration statements, which would cause the The modifier 'static' is not valid for this item compilation error.


public static delegate void MyDelegate(string str);


public delegate void MyDelegate(string str);