Send comments on this topic. |
|
SingleLineCommentsMustNotUseDocumentationStyleSlashes |
|
CheckId |
SA1626 |
Category |
Documentation Rules |
Cause
The C# code contains a single-line comment which begins with three forward slashes in a row.
Rule Description
/// <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)
{
A legal comment beginning with two slashes:
// Join the names together.
string fullName = firstName + " " + lastName;
An illegal comment beginning with three slashes:
/// Trim the name.
fullName = fullName.Trim();
A line of commented-out code beginning with four slashes:
////fullName = asfd;
return fullName;
}
How to Fix Violations
© Microsoft Corporation. All Rights Reserved.