How to create a multiline ///<Summary> section? in c#

  • Thread starter Thread starter arfeengodil
  • Start date Start date
A

arfeengodil

Hi ..

I have this structure in C# with a couple of variables and I'm adding a
little description of that variable like:

/// <summary>
/// Some description
/// Some description line # 2
/// Some description line # 3
/// </summary>
String someVariable;

But when I view it in the intellisense menu, the description is
displayed in one long string instead of three different strings in
three different lines.

I just want to display some important information in this summary
section but having everything cluttered in one big string makes it hard
to read and understand.

Anybody have any ideas ?

Thanks
Arfeen
 
you could also try using <param> and <returns> tags if that is some of
the summary info you have. also <remarks> might help separate
 
Hi ..

I have this structure in C# with a couple of variables and I'm adding a
little description of that variable like:

/// <summary>
/// Some description
/// Some description line # 2
/// Some description line # 3
/// </summary>
String someVariable;

Normally, you'd do it like this:

/// <summary>
/// <para>
/// First paragraph
/// </para>
/// <para>
/// Second paragraph
/// </para>
/// </summary>

but then again, the <summary /> tag is intended to be used for giving a
summary, not a formatted essay about the variable's purpose. So this should
become

/// <summary>Short description</summary>
/// <remarks>
/// <para>
/// First paragraph
/// </para>
/// <para>
/// Second paragraph
/// </para>
/// said:
[...]

Anybody have any ideas ?

Thanks
Arfeen

-Markus-
 
Hi all,
Thanks for the replies, but none of the above suggestions work. So I
guess I'll just go with single line summaries .

Regards
Arfeen
 
workaround for the timebeing:

1. use \n (or any other delimiter) for line break. (do not use the
characters < or > in the delimiter)
2. generate the code comment pages
3. use any editor with the "find and replace in all files" capability
and replace \n or the delimiter with <br>

- Joy
 
Back
Top