I have SalesMan class which is inherited from User class and also implements ISalesMan interface.
public class SalesMan : User, ISalesMan { ... }
I need to convert user objects into salesman objects. I understand that direct casting from User type of objects into SalesMan type is not possible. How should I do the converting? I'm thinking two different ways:
Creating constructor for SalesMan class that takes User parameter and initializes new SalesMan object based on the given User.
Creating new method for the SalesMan class that takes User as a parameter and returns new SalesMan object based on the given User parameter.
...or is there even more smarter way to solve this kind of a problem?