Home > Code Analysis > Code Issues – Static constructors must be parameterless

Code Issues – Static constructors must be parameterless

January 24th, 2011

Cause:

A static constructor is used to initialize any static data, or to perform a particular action that needs performed once only. Parameters are not allowed for static constructors.

Sample:

CodeRush Code Issues - Static constructors must be parameterless

How to fix:

Remove the redundant parameter:

CodeRush Static Constructors Must Be Parameterless Fix

See the full list of code issues specific to constructors.

—–
Products: CodeRush Pro
Versions: 12.1 and up
VS IDEs: any
Updated: Nov/19/2012
ID: C056

Similar Posts: