Partilhar via


Names of Parameters 

Choosing good parameter names can significantly improve the usability of your library. A good parameter name should indicate what data or functionality is affected by the parameter.

Do use camel casing in parameter names.

Do use descriptive parameter names.

In most scenarios, the name of the parameter and its type should be sufficient to determine the parameter's usage.

Consider using names based on a parameter's meaning rather than names based on the parameter's type.

In developer tools and documentation, the parameter's type is usually visible. By selecting a name that describes the usage or meaning of the parameter, you give developers valuable information that helps them identify the right member for their task and the right data to pass into the member.

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.

See Also

Other Resources

Design Guidelines for Developing Class Libraries
Guidelines for Names