Badieh wrote
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?
Hey,
there's no general rule for what you are asking, but there's a best practice,
1- For that its better to stick to one convention for all the controls, FirstName_TextBox for example, here the name is divided into the DescriptionOfTheField_DescriptionOfTheControl.
2- LoginForm or Login_Form, leaving a Form name without prefix/suffix will make you suffer when the project get bigger or when you come after a while to check something in it.
3- For private object name, lower first character case is enough : program.
4- For private variables add "_" , _transactionDate , public variables: TransactionDate.