18

Is there a way to bold text in Intellisense comments?

My idea:

/// <summary>      
/// <para><bold>Paramater1:</bold>: blah blah
...
Tony_Henrich
  • 42,411
  • 75
  • 239
  • 374
  • You are specifically ask about formatting text for classes and methods in your assembly and not BCL and 3rd party libraries, correct? – psubsee2003 Mar 02 '13 at 08:52

2 Answers2

13

I've been looking at how to do this, and haven't found any way. And it's very aggravating.

There are essentially two kinds of intellisense: 1) the info that pops up as you're typing something out (shows overloads and everything) and 2) the tooltip that pops up when you hover over something that's already written out.

I haven't found anything that can affect #2. (And I suppose that isn't strictly intellisense anyway, just a tooltip comment. Though, it does show the same info...)

But for #1 there are a couple things you can do to highlight words and stuff.

The first is using <see cref="SomeActualCodeElementHere" /> which will make whatever you put in the quotes to show as bold (I thought they also used to be clickable and would take you to the definition of that code element, but I can't figure out how to make that work in VS2013).

The second is using <c>AnythingCanGoHere</c> which makes whatever you put in there to show as a different color (blue?). Handy for like <c>true</c> and <c>false</c> and stuff.

Note that when using cref the code element has to be able to be resolved in the current context, or it won't highlight the text. Using <c> however, will highlight/color any text.

One last thing, if you use your documentation externally, or are producing code to be consumed by other developers and are generating xml comment files, then the <b> tag is said to work for some tools. (In Visual Studio when you have a browse reference to an assembly that has an xml comment file with it, VS still behaves as described above, unfortunately.)

Extremely late answer, but Google brought me here, so hopefully this can help either you or someone else out.

sliderhouserules
  • 3,415
  • 24
  • 32
3

You can use "Better Comments" visual studio plugin. This tool allows you to customize your comments as follows:
Use '!' for Important.
Use '?' for Question.
Use "Todo" (Case ignored) for Task.
Use 'x', 'X', or double comment for strikethrough (Crossed).

enter image description here

You can find more options in the link.

Hany
  • 1,310
  • 15
  • 17