I have this function:
public static string Join(this IEnumerable<string> strings, string separator)
{
return string.Join(separator, strings.ToArray());
}
which I want to document. I want the tag to <return>say string.Join(separator, strings.ToArray()), since anyone who can read C # code has more than a thousand words. However, when I use
<return>string.Join(separator, strings.ToArray())</return>
then string.Join (separator, strings.ToArray ()) will be formatted as plain text, which makes it almost unreadable. So I tried
<return><code>string.Join(separator, strings.ToArray())</code></return>
but it always creates a new paragraph ...
So, here is my question:
Is there a way to format a piece of text so that it looks as if it were code? I would be pleased with a fixed-width font.
source
share