Sunday, April 5, 2020

C# XML Documentation Comments

/// <summary>
/// This doubles <paramref name="number" /> and returns it.
/// </summary>
/// <param name="number">any integer</param>
/// <returns>double the inbound value</returns>
public int Double(int number)
{

 
 

Addendum 4/6/2020: If decorating a class instead of a method inside a class, you would maybe just have the summary.

 
 

Addendum 4/10/2020: You could have a <remarks> tag after summary at the top of the file. You may just want a summary at a constructor.

No comments:

Post a Comment