共用方式為


編譯器錯誤 CS0516

更新:2007 年 11 月

錯誤訊息

建構函式 'constructor' 無法呼叫自己本身

程式無法遞迴地呼叫建構函式。

下列範例會產生 CS0516:

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

      public static void Main()
      {
      }
   }
}