What is the best practice to name the second instance of a class? For example, for a class named Employee I create the first instance named as employee. What would be the best name for the second instance of the Employee class when the first instance is still in scope?
Typically the answer is that you don't create a second
Employee variable. If you are dealing with two employees, use a collection like:
Employee employees = new Employee;
Or a List:
List<Employee> employees = new List<Employee>();
If you aren't in a situation where you are just dealing with a group of employees than name the variable what it represents in the context of the code, like any other variable (