Visual Studio XML summary comment on single line

前端 未结 3 2015
-上瘾入骨i
-上瘾入骨i 2021-01-11 11:24

In Visual Studio, how do I change the default XML summary comment snippet from three lines to one line?

Currently it provides this snippet when I type ///

3条回答
  •  天涯浪人
    2021-01-11 11:47

    This is an older question, but I liked Jason Williams's suggestion of creating a snippet for this, so I did. Not very complicated, but copy-and-paste is even easier :)

    
    
      
        
    Single line summary summary
    $end$]]>

    You can change the shortcut by (probably obviously) changing the value.

    Paste that into a new file named SingleLineSummary.snippet and save it in the folder %USERPROFILE%\Documents\Visual Studio 2012\Code Snippets\Visual C#\My Code Snippets (modify to fit your version of Windows and Visual Studio).

    If you're not familiar with snippets, to use this just put the cursor above a method/property/etc, start typing summary, and then hit TAB a couple of times.

提交回复
热议问题