I'd like to have multiple versions of an object with different access modifiers on the properties
For example I might have a user class-
public abstract class UserInfo
{
internal UserInfo()
{
}
public virtual int ID { get; set; }
public virtual string Password { internal get; set; }
public virtual string Username { get; set; }
}
public class ReadUserInfo : UserInfo
{
internal ReadUserInfo()
{
}
override public int ID { get; internal set; }
override internal string Password { get; set; }
override public string Username { get; internal set; }
}
public class NewUserInfo : UserInfo
{
internal NewUserInfo()
{
ID = -1;
}
//You get the Idea
}
Is this something I can implement or do I have to control access in a more programmatic fashion?