Keyboard shortcut to generate comment for functions in c #

2

I have functions in c # aspx in visual studio 201 with 15 parameters approximately

  

function x (param1, param2, etc ...) {}

and I want to add documentation at the top for each parameter

  

/ * @ param1

     

* @ param2

     

* etc.

     

* /

     

function x (param1, param2, etc ...) {}

I have been adding this documentation manually but sometimes I write the parameters wrong or I forget one or do something else wrong, I would like to generate that documentation automatically, there is some way to do it in visual studio 2015 or I have to Continue doing it manually?

    
asked by YHAM 01.02.2017 в 18:29
source

2 answers

7

Apart from what @Pikoh mentions, put ///

You can also use some complement like:

MZTOOLS - link official page

With MzTools you can build templates.

Add-ons to help you document:

It seems that the latter is closer to what you are looking for:

Or look for some nuget to manage your documentation.

    
answered by 01.02.2017 / 19:29
source
7

In visual Studio, if you add 3 slashes /// before a method, a text is generated with the summary of the method and the input and output parameters to fill in, something like this:

/// <summary>
/// 
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void cmbIpp_SelectedIndexChanged(object sender, EventArgs e)

In fact, using <summary> the text you add, as well as the explanation of the parameters will appear in the Intellisense when using the method, which is very useful.

    
answered by 01.02.2017 в 18:32