gicio Posted January 3, 2003 Posted January 3, 2003 looking for something like a code guidline.... i.e. that a TextBox should have the prefix: txt TextBox --> txt i.e. txtCustomer Label --> lbl i.e. lblCustomer String --> str i.e. strCustomer bool --> boo i.e. booIsValide is something like that anywhere available? gicio Quote
*Experts* Volte Posted January 3, 2003 *Experts* Posted January 3, 2003 Doesn't really matter, as long as you're consistance. When I use C#, I use camel case for everything (camelCase) where the first letter is small. I don't use hungarian notation at all in C#. isValid, customerName, cancelButton, are all kinds of things that I personally use. However, I believe that in the MSDN there is a list of the hungarian notation conventions. From the top of my head: Form frm TextBox txt Label lbl Scrollbars hsc/vsc Slider sld Panel pnl (?) Picture pic Button btn For variables, I use (these are not necessarily "official"): String s Numbers (any kind) i Boolean b Char c Quote
*Experts* Bucky Posted January 4, 2003 *Experts* Posted January 4, 2003 If you have the Visual Studio help collection installed, check out the article entitle "Coding Techniques." It contains numerous tips and tricks for naming variables, methods, events, etc. etc. This link is the article mentioned above; it may work: http://ms-help://MS.VSCC/MS.MSDNVS/vsent7/html/vxconcodingtechniques.htm Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.