Skip to content

Gendarme.Rules.Security.StaticConstructorsShouldBePrivateRule(2.10)

Sebastien Pouliot edited this page Jan 22, 2011 · 2 revisions

StaticConstructorsShouldBePrivateRule

Assembly: Gendarme.Rules.Security
Version: 2.10

Description

This rule will fire if a type's static constructor is not private. This is a problem because the static constructor is meant to be called by the runtime but if it is not private then other code may call it as well which may lead to security vulnerabilities. Note that C# and VB.NET enforce this rule.

Examples

Clone this wiki locally