Compiler Error CS0526
Interfaces cannot contain constructors
Constructors cannot be defined for interfaces. A method is considered a constructor if it has the same name as the class and no return type.
The following sample generates CS0526:
// CS0526.cs
namespace x
{
public interface clx
{
public clx() // CS0526
{
}
}
public class cly
{
public static void Main()
{
}
}
}