c# - 摘要,为成员忽略了格式错误的 XML 注释

标签 c# visual-studio

我正在使用摘要属性在 VS 2010 中记录我的类(class)成员。当我构建项目时,XML 文件被构建(我将在稍后的开发中使用它)。类(class)成员的摘要之一未包含在 XML 文件中,而是出现错误“Badly formed XML comment ignored for member”。

摘要如下。我不明白什么格式不正确。我应该转义 & 字符并改用 %26 吗?

    /// <summary>
    /// URI of a web page to convert. Must start with http:// or https://. Several URI of web pages can be passed to create one PDF. For example if http://www.google.com+http://www.nytimes.com URI will be passed the two web pages will be merged into one PDF.
    /// If URI has special characters like ? or & they must be encoded.
    /// </summary>

最佳答案

因为它是 XML,所以您必须对特殊字符进行编码。你的&标志(之前咬过我)需要换成&

关于c# - 摘要,为成员忽略了格式错误的 XML 注释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7349241/

相关文章:

visual-studio - 打开解决方案后,Visual Studio Pro 2012 立即崩溃并出现 MissingFieldException

visual-studio - Msbuild 15 包含未设置为 "do not copy"的配置文件

c# - 在继续执行程序之前验证用户的输入

c# - 检查表在 SQL Azure 中是否存在

c# - 线程池线程抛出的异常显示为未处理

c# - GPU 与 CPU、环境和图形处理

c# - 使用非对齐数组编码结构

c++ - c/c++ for windows 中的 DNS 服务器

c# - 如何在 Web 性能测试中提取 X-XSRF_TOKEN

visual-studio - 为什么 Chrome 中的控制台在 browserLink 中显示 404 not found?