共用方式為


編譯器錯誤 CS1530

更新:2007 年 11 月

錯誤訊息

在命名空間中定義的項目不允許 'new' 關鍵字

沒有必要在命名空間的任何結構上指定 new 關鍵字。

下列範例會產生 CS1530:

// CS1530.cs
namespace a
{
   new class i   // CS1530
   {
   }

   // try the following instead
   class ii
   {
      public static void Main()
      {
      }
   }
}