This documentation is archived and is not being maintained.

Compiler Error CS0132

'constructor' : a static constructor must be parameterless

A static constructor cannot be declared with one or more parameters.

The following sample generates CS0132:

// CS0132.cs
namespace x
{
   public class clx
   {
      public clx(int i)
      {
      }
   }

   public class cly : clx
   {
      static cly(int i)   // CS0132
      {
      }
   }
}
Show: