共用方式為


編譯器警告 (層級 1) CS1574

更新:2007 年 11 月

錯誤訊息

'construct' 上的 XML 註解的 cref 屬性 'name' 句法不正確

傳遞給 cref 標記的字串 (例如,在 <exception> 標記內) 參考到目前建置環境無法使用的成員。您傳遞給 cref 標記的字串必須是句法正確的成員或欄位名稱。

如需詳細資訊,請參閱建議的文件註解標記

下列範例會產生 CS1574:

// CS1574.cs
// compile with: /W:1 /doc:x.xml
using System;

/// <exception cref="System.Console.WriteLin">An exception class.</exception>   // CS1574
// instead, uncomment and try the following line
// /// <exception cref="System.Console.WriteLine">An exception class.</exception>
class EClass : Exception
{
}

class TestClass
{
   public static void Main()
   {
      try
      {
      }
      catch(EClass)
      {
      }
   }
}