10
This is the best way to document code in C#?
/// <summary>
/// Descrição
/// </summary>
10
This is the best way to document code in C#?
/// <summary>
/// Descrição
/// </summary>
14
That’s the way pattern to create documentation for the C code#. That’s where Visual Studio gets the explanation of what the method does to show when you point the mouse at the method or property.
When you are making a call from a function for example, each parameter can have a different explanation of what it does. This is shown by Visual Studio, during coding which helps a lot.
There are tools capable of generating documentation for you when you use this type of documentation. Visual Studio itself, when you compile a code also generates an XML with this documentation, which you can send along with your libraries to provide documentation within Visual Studio... just like when you point your mouse over the method.
13
Yes.
Not only the <summary>
, but all documentation items. This information is mapped by Visual Studio’s Intellisense and appears in Code Completion (code-complete).
Not only that, if you want to generate documentation for written objects and methods, the generation tools use this information to build the documentation automatically.
The minimum body of documentation has the following:
/// <summary>
/// Método selecionar padrão. Recebe uma lista de operadores para selecionar do banco e devolver uma lista
/// </summary>
/// <param name="operadores"></param>
/// <param name="tipoResolucao"></param>
/// <returns>Lista de operadores tipada.</returns>
/// <remarks>Deve ser implementado em cada classe derivada.</remarks>
There are several other tags for documentation. To view them, just add three bars and open the tag (<) that will appear more options on Code Completion.
Browser other questions tagged c# documentation summary
You are not signed in. Login or sign up in order to post.