- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
ID: csharp-best-practices/summary-documentation-comment
Language: C#
Severity: Info
Category: Best Practices
The rule requires that all classes and methods in C# have a summary documentation comment. The summary documentation comment is a special type of comment that starts with /// <summary>
and ends with /// </summary>
. This comment is used to provide a brief description of the class or method, which can be helpful for other developers, or for generating documentation.
The lack of summary documentation can make the code harder to understand and maintain, especially for large projects or when working in a team. It can be difficult to understand the purpose of a class or method just by its name, especially if it’s complex or not self-explanatory. Providing a summary documentation comment can save time and effort for anyone who needs to understand or update the code in the future.
Ensure that the documentation comments (starting with ///
) have the <summary></summary>
field.
/// a class doing something
/// a lot of things!
public class MyClass()
{
/// a method doing something
public void foo() {
}
}
// a class doing something
// a lot of things!
public class MyClass()
{
// a method doing something
public void foo() {
}
}
/// <summary>
///
/// </summary>
public class MyClass()
{
/// <summary>
///
/// </summary>
public void foo() {
}
}
|
|
For more information, please read the Code Security documentation
Identify code vulnerabilities directly in yourVS Code editor
Identify code vulnerabilities directly inJetBrains products