Last post Jun 13, 2013 04:37 AM by adeelehsan
Jun 13, 2013 02:42 AM|senthilkcg|LINK
I have two classes ClsEmployee and inhertited class ClsEmployeeDoc.
Emp = new ClsEmployee();
Emp = new ClsEmployeeDoc();
Emp1 = new ClsEmployeeDoc();
what is the difference between the two??
Jun 13, 2013 04:31 AM|Paul Linton|LINK
In the first one you have one variable. The ClsEmployee instance that you created is no longer referenced and available for garbage collection.
In the second one you have two variables.
Did you have a specific question?
Jun 13, 2013 04:37 AM|adeelehsan|LINK
In both cases, the reference of the parent is pointing to the object of child calss. The only difference is in 1st case you lose the reference to the parent object.