Dumb question.
Lets say I have a bunch of person objects with their fields all filled in with data and I have an employee type that derives from the person class and has extra fields related to being an employee. How do I get a employee object for a particular existing person object? i.e. How do I pass in the person object to the employee?
If the person was created as an employee, then just cast:
If the person is just a person: you can’t; you could have the employee encapsulate the Person – or you can copy the fields:
or