共用方式為


編譯器錯誤 CS1027

更新:2007 年 11 月

錯誤訊息

必須有 #endif 指示詞

找不到指定的 #if 指示詞的對稱 #endif前置處理器指示詞。或者,編譯器在 #if 區塊內尚未找到對稱的 #region 指示詞時,可能已找到 #endregion 指示詞。

下列範例會產生 CS1027:

// CS1027.cs
#if true   // CS1027, uncomment next line to resolve
// #endif

namespace x
{
   public class clx
   {
      public static void Main()
      {
      }
   }
}