Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将 XML 嵌入到 C# XML 文档注释中(例如,在方法的标头中)?
将其放入 CDATA 部分,并将 CDATA 部分放入<code>元素中,以便正确格式化:
<code>
/// <example> /// <code> /// <![CDATA[ /// <someXml> /// ... /// </someXml> /// ]]> /// </code> /// </example>
在代码文件中按“/”(斜杠)3 次,它将打开代码摘要部分。您可以在该部分粘贴您的 xml。