I'm documenting a few methods I wrote in C# that deal with parsing tokens. Due to some technical restraints in other areas of the system, these tokens need to take the form of XML elements (i.e., <tokenName />
). I'd like to put the format of those tokens in the summary statement itself.
However, this throws an error: Badly formed XML -- A name was started with an invalid character". Is there any sort of escape character sequence I can use to embed XML in my C# summary comments?
Use standard XML escaping. For example:
<summary>This takes a <token1> and turns it into a <token2></summary>
It's not super-easy to type or read as code, but IntelliSense properly unescapes this and you see the right, readable thing in the tooltip.