Naming convention

Share this topic:

Link to this posting

Postby Ursego » 21 Feb 2013, 10:39

Use a naming convention if it exists in your programming language / organization.

IMHO, it's very important to easily distinguish in code between:

1. Local variables (including arguments to functions) and instance variables. You are lucky if your IDE automatically displays variables of different scope using different colors /bold/italic (as my favorite Eclipse does), but if it doesn't - you can use, for example, the following practice:

2. GUI controls of different types, like lblFirstName (for Label), txtCity (for TextBox), btnCancel (for Button), dgCustomers (for DataGrid) etc.

3. Objects of different classes in frameworks like ADO.NET, for example: cnConnection, cmdCommand, dsDataSet, tblDataTable, rowDataRow, colDataColumn, drDataReader, daDataAdapter...
User avatar
Site Admin
Posts: 112
Joined: 19 Feb 2013, 20:33

Return to Art of Naming

Who is online

Users browsing this forum: No registered users and 1 guest

Naming convention

Share this topic:

If you think that this site is not too bad, please LIKE it in Facebook. Thanks!

free counters

eXTReMe Tracker