DOC207

February 14, 2021 ยท View on GitHub

TypeName DOC207UseSeeLangwordCorrectly
CheckId DOC207
Category Portability Rules

Cause

The documentation contains a <see langword="..."/> element with an unrecognized keyword.

Rule description

A violation of this rule occurs when documentation contains a see langword element but the reference is not recognized as a language keyword.

/// <summary>
/// This variable is <see langword="correct"/>.
/// </summary>
public int correct;

How to fix violations

To fix a violation of this rule, replace the see langword syntax with the equivalent inline code.

/// <summary>
/// This variable is <c>correct</c>.
/// </summary>
public int correct;

How to suppress violations

#pragma warning disable DOC207 // Use 'see langword' correctly
/// <summary>
/// This variable is <see langword="correct"/>.
/// </summary>
public int correct;
#pragma warning restore DOC207 // Use 'see langword' correctly