How do I write comments on method parameters?

In what form should I write comments to the method parameters, so that when the method is called, these comments are in its tooltip?

Author: Kromster, 2015-01-27

2 answers

There is such a thing - xml comments. They differ from the usual ones in that they are preceded by three slashes, not two. For example:

/// <summary>
/// Описание метода
/// </summary>
/// <param name="arg">Описание параметра</param>
/// <returns>Ogbcfybt возвращаемого значения</returns>
public int SomeMethod(string arg)
 10
Author: DreamChild, 2015-01-27 22:13:54

Put / / / slashes before the member's name, then the studio will generate a stub for comments. You can fill it in as in the example.

/// <summary>
/// Некоторый метод.
/// </summary>
/// <param name="count">Количество</param>
/// <returns></returns>
public void Method(int count)
{

}
 6
Author: sp7, 2015-01-27 14:37:09