Every public API element (classes, methods, properties, constructors) must have XML documentation comments that clearly describe its purpose and usage. This improves developer experience through IntelliSense and ensures the API is well-documented.
Every public API element (classes, methods, properties, constructors) must have XML documentation comments that clearly describe its purpose and usage. This improves developer experience through IntelliSense and ensures the API is well-documented.
For implementation classes that implement interfaces:
<inheritdoc />
at the class level to inherit documentation from interfacesFor method parameters and properties:
<param>
descriptions rather than <remarks>
for better IntelliSense visibility<param name="paramName">Description (additional context)</param>
Example:
/// <summary>
/// Creates a new repository transfer description.
/// </summary>
/// <param name="newOwner">The new owner of the repository after the transfer.</param>
/// <param name="teamId">A list of team Ids to add to the repository (only applies to Organization owned repositories).</param>
public RepositoryTransfer(string newOwner, IReadOnlyList<int> teamId)
{
Ensure.ArgumentNotNullOrEmptyString(newOwner, nameof(newOwner));
Ensure.ArgumentNotNullOrEmptyEnumerable(teamId, nameof(teamId));
NewOwner = newOwner;
TeamId = teamId;
}
Maintain consistency across similar members - if one method overload has documentation, all overloads should be documented with the same level of detail.
Enter the URL of a public GitHub repository