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.
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.
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.