473,399 Members | 4,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

NewLine in Documentation Comment

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
Nov 15 '05 #1
3 11855
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

"David Martin" <We*****@dfmartin.com> wrote in message
news:OI**************@tk2msftngp13.phx.gbl...
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

Nov 15 '05 #2
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.

"Kirk Graves" <kr***********@yahoo.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
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

"David Martin" <We*****@dfmartin.com> wrote in message
news:OI**************@tk2msftngp13.phx.gbl...
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


Nov 15 '05 #3
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
David Martin wrote:
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.

"Kirk Graves" <kr***********@yahoo.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
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

"David Martin" <We*****@dfmartin.com> wrote in message
news:OI**************@tk2msftngp13.phx.gbl...
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



Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: p brian | last post by:
Dear all, Weirdly enough i do not think I have come across this before. Perhaps I do not use enough comments.... mystring = "hello " + someVariable + \ "multiple lines 4 clarity" + \...
12
by: Fredrik Olsson | last post by:
Hello. For Java there is javadac, for Obj-C headerdoc2html, for C doxygen, and even for good old VB 6 there is VBDox. But I have found no suitable tool for documenting my .net code to get...
1
by: Ole Hanson | last post by:
I would like to be able to generate documentation for a custom configuration file (xml) to enable future support engineers to understand applicable values to the various elements inside the...
29
by: runningdog | last post by:
Hi, I would like to be able to embed a newline in a text string. Is there any convienent notation to do this TIA Steve
97
by: Cameron Laird | last post by:
QOTW: "Python makes it easy to implement algorithms." - casevh "Most of the discussion of immutables here seems to be caused by newcomers wanting to copy an idiom from another language which...
40
by: GTi | last post by:
Is there any source code documentation tools available for Visual Studio 2005 ? I have created a LIB that must be documented. Must I do it by hand or is it some kind of tools to pre document my...
7
by: anatoli.barski | last post by:
I currently use xml.dom.minidom and ext to create a dom-tree which I would write to an xml-file. My intention is to create something like this: <Robot> <!-- armar3 --> <Joint> </Joint> ...
5
by: Bob Altman | last post by:
I thought I read somewhere in the MS documentation that XML documentation is compiled in C++, but the C++ code editor obviously doesn't do anything interesting when I enter "///". What's the deal...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.