Naming Resources

Naming Resources


Because localizable resources can be referenced via certain objects as if they were properties, the naming guidelines for resources are similar to property guidelines.

✓ DO use PascalCasing in resource keys.

✓ DO provide descriptive rather than short identifiers.

X DO NOT use language-specific keywords of the main CLR languages.

✓ DO use only alphanumeric characters and underscores in naming resources.

✓ DO use the following naming convention for exception message resources.

The resource identifier should be the exception type name plus a short identifier of the exception:



Portions © 2005, 2009 Microsoft Corporation. All rights reserved.

Reprinted by permission of Pearson Education, Inc. from Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries, 2nd Edition by Krzysztof Cwalina and Brad Abrams, published Oct 22, 2008 by Addison-Wesley Professional as part of the Microsoft Windows Development Series.

© 2015 Microsoft