|
-
Jan 14th, 2003, 06:34 AM
#1
Thread Starter
New Member
Coding/Naming Convention?
Hi all, I read that Microsoft VB .NET naming convention is MyCar and those things. I understand that Microsoft is sort of moving away from using strMyCar for string and so on.
But I would like to know how do you all naming your form components like Button, Label, ListBox... in VB .NET? Do you all use btnMyButton or just MyButton? What should I use?
Microsoft never seems to touch on this and I would like to follow a standard convention.
Thx
DES!GNBRANZ @ http://www.des!gn.bz
-
Jan 14th, 2003, 06:46 AM
#2
The prefixes have been removed from the naming conventions, and I am glad about that.
In my humble experience, I have seen comboboxes with the txt prefix, textboxes with the cbo prefix, Long integers with the int prefix etc.
The problem with these prefixes is that they either work confusing when the program needs to be changed (integer is changed into long, or textbox is changed into a combobox) and the easy solution is chosen (just change the object, don't change the name), or they increase the time needed to make the change (where is the variable or object name used?, you have to change them all).
-
Jan 14th, 2003, 06:52 AM
#3
Frenzied Member
Dont gain the world and lose your soul
-
Jan 14th, 2003, 06:55 AM
#4
Thread Starter
New Member
Yah, I understand the trouble of when the type is changed later and I am glad the prefix naming convention is now "out". I am somehow confused when trying to name my Form Components.
I guess if I have a Label with Myself as title, then I would just name the label as MyselfLabel? Or just MyselfTitle? Its quite unlikely that we will change the "type" of component for the variable right. If I do not name the IDE components as what they are like label, button, listbox, I wouldn't know what properties they have and would confuse with created variables.
DES!GNBRANZ @ http://www.des!gn.bz
-
Jan 14th, 2003, 06:57 AM
#5
Thread Starter
New Member
I checked there before. They highlighted method, classes, variables naming and so on. They never highlight how I should name my form components like labels, buttons, listbox and so on. So I was wondering what standard I should use.
DES!GNBRANZ @ http://www.des!gn.bz
-
Jan 14th, 2003, 07:06 AM
#6
yay gay
in C# we use the camel Case convention
\m/  \m/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|