Monday, January 23, 2006

Data Type Naming Conventions.


Data TypeExamplePrefix
Boolean
blnResult
bln
Byte
bytByte
byt
Char
chrCase
chr
Date
datStart
dat
Double
dblSum
dbl
Decimal
decAveragedec
Integer
intEmpId
int
Long
lngCounter
lng
Single
sngStock
sng
Short
shoShort
sho
String
strName
str
Most commonly used Hungarian Notations for data types. First three letters of a variable name to distinguish subtype. The fourth letter of the variable is then typed in uppercase, to indicate that this where the actual variable name starts.

5 comments:

Anonymous said...

Hello kuldeep,

I found these hungarian notations very useful to apply in projects.

goood.

regards

Manjeet

Anonymous said...

I've heard the new naming convention is to use words that describe the object instead of using hungarian notation.

Anonymous said...

hungarian notation is discouraged in these days. Microsoft has published a set of design guidelines, including naming conventions, for .NET : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconNETFrameworkDesignGuidelines.asp

KD said...

Thank you very much for sharing up to date information.

Regards

Kuldeep

Anonymous said...

i have a project in which i have a repeater named reprecords and have data items in it .accessing from the table aND HAVE CHECK BOXES with it i want that whenever i check my check boxes the selected box items shuld be viewed .and i have an item template in which one checkbox id = chk1 and in the alternate itemtemplate i have checkbox id = chk2 ..so please help me out !!!

Visitor Count: