c# – How to write comments to method parameters?

Question:

In what form should comments on method parameters be written so that when the method is called, its tooltip contains these comments?

Answer:

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

/// <summary>
/// Описание метода
/// </summary>
/// <param name="arg">Описание параметра</param>
/// <returns>Ogbcfybt возвращаемого значения</returns>
public int SomeMethod(string arg)
Scroll to Top