- Edited
Hello All,
I've been trying to find the best way to name variables, classes, forms, controls, etc... In our .NET projects. However, it seems like there are a lot of controversy when it comes to naming, and so I'd like to see what you guys think.
To start off, I have the following questions:
1 - Do you prefix your controls with their type abbreviation? Or do you Suffix them with their type name? Or do you suffix them with a simple 'Label / Field' ? (EX: txtFirstName , FirstNameTextBox, FirstNameField)
2 - When adding a new form, do you prefix the name, suffix the name, or leave it as it? (EX: frmLogin, LoginForm, Login)
3 - When you instantiate a private object from a Class, do you prefix it? If yes, what with? oProgram, cProgram, mProgram, _Program?
4 - Do you use the prefix 'm' for local private variables, and 'g' for public global variables?
Thanks :)
I've been trying to find the best way to name variables, classes, forms, controls, etc... In our .NET projects. However, it seems like there are a lot of controversy when it comes to naming, and so I'd like to see what you guys think.
To start off, I have the following questions:
1 - Do you prefix your controls with their type abbreviation? Or do you Suffix them with their type name? Or do you suffix them with a simple 'Label / Field' ? (EX: txtFirstName , FirstNameTextBox, FirstNameField)
2 - When adding a new form, do you prefix the name, suffix the name, or leave it as it? (EX: frmLogin, LoginForm, Login)
3 - When you instantiate a private object from a Class, do you prefix it? If yes, what with? oProgram, cProgram, mProgram, _Program?
4 - Do you use the prefix 'm' for local private variables, and 'g' for public global variables?
Thanks :)