I'm writing an HTML parser in C# and want to include examples of the HTML that it handles in the summary XML blocks. How do I prevent the < and > characters from messing up the auto-documentation of Visual Studio 2008?
example:
/// <summary>
/// Creates a FlowSegment based on an HTML code, i.e. <bold>
/// </summary>
/// <param name="code"></param>
/// <returns></returns>
public FlowSegment(string code)
{
Unfortunately the example causes the tool tip for this constructor to display (in part):
XML comment includes invalid XML
instead of the summary comment.
How can I escape the < and > characters?