Share via


Compiler Error CS0516

Constructor 'constructor' can not call itself

A program cannot recursively call constructors.

The following sample generates CS0516:

// CS0516.cs
namespace x
{
   public class clx
   {
      public clx() : this()   // CS0516, delete "this()"
      {
      }

      public static void Main()
      {
      }
   }
}