Friday, December 12, 2008

Guidelines for Names

 

Guidelines for Names

Naming guidelines provide guidance on selecting appropriate identifiers for the elements that make up class libraries including assemblies, namespaces, types, members, and parameters. Choosing identifiers that conform to these guidelines improves the usability of your library and encourages users to trust that your library will not require learning a new set of conventions.

To provide a consistent developer experience, these guidelines are required for publicly exposed elements such as public classes and protected methods. However, for consistency throughout your code and improved maintainability, you should consider using these conventions consistently throughout your code.

Portions Copyright 2005 Microsoft Corporation. All rights reserved.

Portions Copyright Addison-Wesley Corporation. All rights reserved.

For more information on design guidelines, see the "Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries" book by Krzysztof Cwalina and Brad Abrams, published by Addison-Wesley, 2005.

In This Section

Capitalization Conventions

Describes the different casing systems and when each should be used.

General Naming Conventions

Describes general rules for selecting clear, readable names.

Names of Assemblies and DLLs

Describes conventions for naming managed assemblies.

Names of Namespaces

Describes conventions used for namespace names and how to minimize conflicts between namespaces.

Names of Classes, Structs, and Interfaces

Describes conventions that should be followed, as well as those that should be avoided, when naming types.

Names of Type Members

Describes the best practices for selecting names for methods, properties, fields, and events.

Names of Parameters

Describes the best practices for choosing meaningful parameter names.

Names of Resources

Describes the best practices for selecting names for localizable resources.

See Also

Other Resources

Design Guidelines for Developing Class Libraries

Guidelines for Names

No comments:

Blog Archive