Bold or italic in C# or VB documentation comments?

miroxlav picture miroxlav · Jun 7, 2016 · Viewed 9.1k times · Source

Is there a way to use bold or italic inside documentation comments? Something like:

/// <summary>Cleanup method. This is <b>recommended</b> way of cleanup.</summary>
public void CleanAll();

List of predefined tags does not contain such a features, but do you know of some way of achieving emphasis/highlighting? Preferably, if it could be shown also in tooltips when hovering over the code.

We have <c> and <code> there, but they already have their semantics.

Answer

Batesias picture Batesias · Oct 4, 2019

This feature is now available in Visual Studio 2019 version 16.3.0 (release notes).

  • You can use the <i> or <em> tags for italic.
  • You can use the <b>or <strong> tags for bold.
  • From the release notes, a variety of html tags seem to be supported, but the official documentation doesn't seem to be updated with this new feature just yet.

It looks like this: .