How to place the code example in the XML comment?

Tony picture Tony · Sep 6, 2012 · Viewed 7.7k times · Source

I have a XML comment like that.

/// <summary>
/// Lorem ipsum
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>

I'd like to place inside it a piece of the (multiline) code. How can I do that ?

Edit

Here's the info about multiline code Adding line breaks to comments for Intellisense

Answer

oleksii picture oleksii · Sep 6, 2012

You can use <code> and <c> XML tags

/// <summary>
/// ...
/// <c>Place your code here</c>
/// </summary>
/// <code>
/// More code here
/// </code>

Per comment, in the <summary> you can use a <c> tag and outside <summary> you can use a <code> tag.