Auto generate function documentation in Visual Studio

Ryan M picture Ryan M · Jan 9, 2009 · Viewed 157.5k times · Source

I was wondering if there is a way (hopefully keyboard shortcut) to create auto generate function headers in visual studio.

Example:

Private Function Foo(ByVal param1 As String, ByVal param2 As Integer)

And it would automagically become something like this...


'---------------------------------- 
'Pre: 
'Post:
'Author: 
'Date: 
'Param1 (String): 
'Param2 (Integer): 
'Summary: 
Private Function Foo(ByVal param1 As String, ByVal param2 As Integer)

Answer

Michael Paulukonis picture Michael Paulukonis · Jan 9, 2009

Make that "three single comment-markers"

In C# it's ///

which as default spits out:

/// <summary>
/// 
/// </summary>
/// <returns></returns>

Here's some tips on editing VS templates.