NewLine in Documentation Comment

  • Thread starter Thread starter David Martin
  • Start date Start date
D

David Martin

Is there a way to insert a newline into a documentation comment? The
intention is to have the tooltip that appears with Intellisense show the
line breaks so that the description is easier to read.

For example, I have a method where one of the parameters is a bool. The
diference between true and false is significant to the results. I would
like the tool tip to read as follows for that parameter:

IsBoolParam: true = blah blah blah blah
false = blah blah blah

instead of this:

IsBoolParam: true = true = blah blah blah blah. false = blah blah blah

Any help is greatly appreciated. Also, if you know of a source of
information regarding other ways these documentation comments may be
formatted it would be great.

-David Martin
 
David,

you will have to do this manually, you can't set it through the properties
window.

do into the "Windows Form Designer generated code" region and look for the
line that sets your Tooltip text.
it ought to look something like this:
---------------------------------
this.toolTip1.SetToolTip(this.checkedListBox1, "IsBoolParam: true = blah
blah blah blah false = blah blah blah");
-------------------------------

change it to include the \r\n where you need it

-----------------------------
this.toolTip1.SetToolTip(this.checkedListBox1, "IsBoolParam: true = blah
blah blah blah\r\nfalse = blah blah blah");
-------------------------------

of course if you are doing this somewhere in your code, just do the same
thing.

Kirk Graves
 
Thanks, but that is not what I am looking for. I don't have a tooltip
control. I am talking about the documentation comments on a class or
member. For instance, on a method you may see

///<summary>
///This is my sample method that does such and such.
///</summary>
///<param name="ClientID">A unique integer representing the primary key for
the client<param>
///<returns>Returns a bool true if the client exists and false if it does
not</returns>
public bool IsClient(int ClientID)
.....

This results in an **Intellisense** tooltip (inside of the code window - not
in the finished product) to assist the developer. I'd like to be able to
insert linebreaks into say, the returns. Something like
///<returns>Returns bool \n true = exists \n false = does not
exist</return>

so that the developer will see
Returns bool.
true = exists
false = does not exist

instead of "Returns bool. true = exists. false = does not exist."

Thanks.
 
I think you are looking for the <para> tag. Just use it in the <returns>
tag so that it starts a new paragraph.

Chad Evans
 
Back
Top