Question

In the following example, & and Δ are OK but Δ is not (the latter two are both Δ). The compiler issues a warning similar to:

warning CS1570: XML comment on 'XXX.DocumentedMethod()' has badly formed XML -- 'Reference to undefined entity 'Delta'.'
    /// <summary>
    ///  &amp; &Delta; &#916;
    /// </summary>
    public void DocumentedMethod()
    {

    }

What are the supported character entities for XML comments?

Was it helpful?

Solution

It's not a matter of comments, it's XML itself. XML only inherently knows about &amp;, &lt;, &gt;, &apos; and &quot; as well as the numeric entities. Anything else has to be declared explicitly.

See section 4.6 of the spec for further information.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top