Question

Below comment is just a piece of xml comment in VS but my problem is characters like < > that break the xml structure. How can I use them in an xml comment?

/// <param name="index">square index on board which 1<=index<=64</param>
Was it helpful?

Solution

/// <param name="index">square index on board which 1&lt;=index&lt;=64</param>

OR

/// <param name="index">square index on board which 1〈=index〈=64</param> 

The latter option is unicode: 〈 〉

OTHER TIPS

I would reword it to be more a sentence and less an equation:

/// <param name="index">square index on board, between 1 and 64</param>

Try encoding them? using &lt; and &gt;

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