更新: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)
{
}
}
}