I have a question on how to initialize an object based on user role.
For example, say, I have an abstract class User. There exist 3 different kinds of user Admin, Member, Moderator,
Every one has it's own set of functionality
How do I initiate an object of a particular type based on user role?
Suppose I have an abstract class User with a property Role which is an Enum.
I would like to code it like this
User user = new User();
u.Role = UserRole.Admin;
then Object user must be decorated with the properties of Admin.
I just want's to know how do I change it?
Here is what I was trying to do... is shown in Code block below
Please Reply
Regards