Back to all reviewers

Use domain-specific type names

Azure/azure-sdk-for-net
Based on 6 comments
C#

Types should be named with clear domain context rather than generic terms. Avoid single-word or overly generic names that could be ambiguous or conflict with other types. Instead, prefix type names with their domain or service name to provide clear context and prevent naming collisions.

Naming Conventions C#

Reviewer Prompt

Types should be named with clear domain context rather than generic terms. Avoid single-word or overly generic names that could be ambiguous or conflict with other types. Instead, prefix type names with their domain or service name to provide clear context and prevent naming collisions.

Example - Instead of:

public class ConnectorData { }
public class Performance { }
public class HttpGet { }

Use domain-specific names:

public class ImpactReportingConnector { }
public class WorkloadPerformanceMetrics { }
public class HttpGetOperation { }

This makes the code more maintainable by:

  • Preventing naming conflicts across different services/domains
  • Making type purposes immediately clear from their names
  • Improving code searchability and navigation
  • Reducing cognitive load when reading code
6
Comments Analyzed
C#
Primary Language
Naming Conventions
Category

Source Discussions