Send comments on this topic. |
|
Cause
Rule Description
A violation of this rule occurs when an element contains two or more identical documentation texts. For example:
/// <summary>
/// Joins a first name and a last name together into a single string.
/// </summary>
/// <param name="firstName">Part of the name.</param>
/// <param name="lastName">Part of the name.</param>
/// <returns>The joined names.</returns>
public string JoinNames(string firstName, string lastName)
{
return firstName + " " + lastName;
}
How to Fix Violations
To fix a violation of this rule, edit the documentation for the element and ensure that each of the individual documentation texts are unique. For example:
/// <summary>
/// Joins a first name and a last name together into a single string.
/// </summary>
/// <param name="firstName">The first name to join.</param>
/// <param name="lastName">The last name to join.</param>
/// <returns>The joined names.</returns>
public string JoinNames(string firstName, string lastName)
{
return firstName + " " + lastName;
}
© Microsoft Corporation. All Rights Reserved.