9

Possible Duplicate:
XML multiline comments in C# - what am I doing wrong?
Multiline XML Comments in VB.Net and Visual Studio Intellisense

I want to have some description for my method

/// <summary> 
/// Perform a divide by b
///      e.g a = 1, b = 2
/// will return 0, since (1/2) = 0.5
/// </summary>
/// <returns>int value</returns>
public static int Div(int a, int b)
{


    return (a / b);
}

and i want the description show in the same format that i type.. however, those text will always display in oneline.

is there any tag that i can use to ask visual studio to include all those space and new line?

Thanks

Community
  • 1
  • 1
jojo
  • 13,583
  • 35
  • 90
  • 123
  • possible duplicate of [XML multiline comments in C# - what am I doing wrong?](http://stackoverflow.com/questions/2547327/xml-multiline-comments-in-c-sharp-what-am-i-doing-wrong), [Adding line breaks to comments for Intellisense](http://stackoverflow.com/questions/467202/adding-line-breaks-to-comments-for-intellisense), [Multiline XML Comments in VB.Net and Visual Studio Intellisense](http://stackoverflow.com/questions/7070737/multiline-xml-comments-in-vb-net-and-visual-studio-intellisense) – Cody Gray - on strike Jan 20 '12 at 03:36
  • Are you asking specifically about the code you've included or is it merely an example? There is a tag for providing sample implementations of your code that you could use if the code you've provided is the extent of what you're after. – M.Babcock Jan 20 '12 at 04:03
  • 2
    You do, of course, realize that a method accepting two integer parameters and performing integer division and returning an integer is not going to return 0.5, right? – Anthony Pegram Jan 20 '12 at 04:32

1 Answers1

22

I believe putting your lines in <para /> tags works.

///<summary>
///<para>line1</para>
///<para>line2</para>
///</summary>
itsme86
  • 19,266
  • 4
  • 41
  • 57