vb.net - automatic XML comments - ''' — Can I change the automatic defaults?

假如想象 提交于 2020-01-02 14:31:13

问题


I'm using Visual Studio 2008 SP1

in VB.NET, when I type ''' above a function, some automatic default XML comments appear:

''' <summary>
''' 
''' </summary>
''' <remarks></remarks>

I would like this to be the following instead:

''' <summary></summary>
''' <remarks></remarks>

Is there a way to change what appears when you type ''' above a function?


回答1:


They key is in the VBXMLDoc.xml file. It provides templating for all of the XML comments in VB.NET. Still have not checked if there is a solution for C#. I went so long in wanting it for C#, but have actually just gotten used to the ugly default format.

How to Customize the XML Comments that are inserted by the Visual Basic Code Editor?




回答2:


At my last place we wrote a VBA macro to insert the remarks for us and then bound it to a hotkey. This allowed us to write ouw own custom comment blocks with additional parameter and a good deal of the information already present.

Check out this article for the full details: http://msdn.microsoft.com/en-us/magazine/cc163757.aspx




回答3:


use GhostDoc! :-)



来源:https://stackoverflow.com/questions/1610318/vb-net-automatic-xml-comments-can-i-change-the-automatic-defaults

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!