Skip to content
| Marketplace
Sign in
Visual Studio>Tools>SampleCodeCommentConverter
SampleCodeCommentConverter

SampleCodeCommentConverter

eCollab

|
60 installs
| (0) | Free
Convert C# code snippet to XML sample code comment that can be conveniently inserted into XML documentation comments.
Download

This is a Visual Studio extension that can convert C# code snippet to XML sample code comment(or vice versa).

Instructions

This extension adds two menu items Code To XML Comment, Code From XML Comment to the code editor’s context menu.

Preview Image

Select code snippet or XML comment you want to convert and click the menu item, the result will be placed on the system clipboard. Both starting and ending lines of your selection will be automatically extend to the whole line.

Code To XML Comment

  • Lines start with triple-slash will be ignored, while all other lines will be treated as code snippet.
  • To exclude <code> tag from the result, holding Shift key while clicking the menu item.
  • The result will always start with a newline string(Environment.NewLine).
  • To get well-formatted result, make sure your code snippet is well-formatted before clicking the menu item.

Code From XML Comment

  • Lines start with triple-slash will be treated as valid comments, while all other lines will be ignored.
  • All non-XML-tagged comments will be treated as code snippet.
  • By default, only comments within <code> and </code> tags will be extracted. If you want skip <code> tag detection, holding Shift key while clicking the menu item.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft