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

Constant cannot be marked static

CodeRush Classic shows the Constant cannot be marked static code issue if a constant is marked static.


Remove the static keyword from the constant declaration.


Highlights the constant declaration statements, which would cause the The constant cannot be marked static compilation error.


private static const double Pi = 3.14;


private const double Pi = 3.14;