Hi I have just been struggling with how to inherit and extend properties in the child class' nested class from the parent class' nested class. Example Below:
public class AttributeViewModel{
//Common Properties...
public AttributeViewModelSettings Settings {get; set;}
public class AttributeViewModelSettings {
//Common Settings
}
}
public class ListAttributeViewModel : AttributeViewModel {
//List specific properties...
public ListAttributeViewModelSettings Settings { get; set; }
public class ListAttributeViewModelSettings : AttributeViewModelSettings {
//Settings Specific to Child Class
}
}
We are doing this as we are not yet sure which settings will be needed for each of the possible attributes the user can select. Doing it this way would allow us to change those settings easily but I just cannot figure out the right way to approach something like this.