Saturday, September 27, 2003

"camelCase" and "PascalCase" Guidelines

The following table should provide you to use those rules:

Type Case Additional Information
----------------------------------------------------------------------------------------------------------------------------------------------
Class PascalCase Ex.: MyClass, Utility, DataHelper

Enum value PascalCase Ex.: Colors.Red, PossibleValues, ValueOff

Enum type PascalCase Ex.: Colors, PossibleValues

Event PascalCase Ex.: MouseClick, ButtonDown

Exception class PascalCase Ex.: MyCustomException, XxxException etc.

Interface PascalCase Ex.: use always "I" as prefix like: ICar, ISerializable etc.

Method PascalCase Ex.: GetItemData, SetItemInfo etc.

Namespace PascalCase Ex.: Company.NewApplication.DataTier

Property PascalCase Ex.: ItemValue, DataParameter etc.

Parameter camelCase Ex.: itemArray, valueData, purchasePrice etc.

===============================================================================
Private member camelCase Ex.: Microsoft makes no recommendation on this, however
variable its make sense to distinguish private member variables from
other identifiers.

No comments:

Shared Cache - .Net Caching made easy

All information about Shared Cache is available here: http://www.sharedcache.com/. Its free and easy to use, we provide all sources at codeplex.

Facebook Badge