DOC106
February 11, 2021 ยท View on GitHub
| TypeName | DOC106UseTypeparamref |
| CheckId | DOC106 |
| Category | Style Rules |
Cause
The documentation contains a type parameter reference using <c>T</c> that can be converted to the preferred form
<typeparamref name="T"/>.
Rule description
A violation of this rule occurs when documentation contains a type parameter reference written in inline code that can
be written in a preferred form using typeparamref.
/// <summary>
/// Pass in a <c>T</c>.
/// </summary>
public void Method<T>()
{
}
How to fix violations
To fix a violation of this rule, replace the inline code with the equivalent typeparamref syntax.
/// <summary>
/// Pass in a <typeparamref name="T"/>.
/// </summary>
public void Method<T>()
{
}
How to suppress violations
#pragma warning disable DOC106 // Use 'typeparamref'
/// <summary>
/// Pass in a <c>T</c>.
/// </summary>
public void Method<T>()
#pragma warning restore DOC106 // Use 'typeparamref'
{
}