What's the proper way to comment a constructor in a generic class?
You need to use curly braces:
/// <summary>
/// Initializes a new instance of the <see cref="Repository{T}"/> class.
/// </summary>
For each typeparam
, just add an additional value in the braces, delimited with a comma.
StyleCop has defined how it should look like.
If the class contains generic parameters, these can be annotated within the cref link using either of the following two formats:
/// <summary>
/// Initializes a new instance of the <see cref="Customer`1"/> class.
/// </summary>
public Customer()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="Customer{T}"/> class.
/// </summary>
public Customer()
{
}