Compiler Error CS0515

'function' : access modifiers are not allowed on static constructors

A static constructor cannot have an access modifier.

Example

The following sample generates CS0515:

// CS0515.cs
public class Clx
{
    public static void Main()
    {
    }
}

public class Clz
{
    public static Clz()   // CS0515, remove public keyword
    {
    }
}