编译器警告(等级 3)C4635

XML 文档注释目标: XML 格式不正确: 原因

编译器发现此 XML 标记存在一些问题。 解决该问题并重新编译

下面的示例生成 C4635:

// C4635.cpp
// compile with: /doc /clr /W3 /c
/// <summary>
/// The contents of the folder have changed.
/// <summary/>   // C4635

// try the following line instead
// /// </summary>
public ref class Test {};

请注意,此示例的输出显示: 结束标记“member”与开始标记“summary”不匹配。

此示例的问题在于 <summary> 的结束标记格式不正确,编译器无法将其识别为 <summary> 结束标记。 <member> 标记由编译器在每次 /doc 编译中嵌入到 .xdc 文件中。 因此,这里的问题是结束标记 </member> 与编译器处理的前一个开始标记 (<summary>) 不匹配。