[Serializable] [XmlRoot("Rules")] public class RuleRoot { [XmlElement("Items")] public List<RuleGroup> Groups { get; set; } }Then, in Groups I have:
[Serializable] [XmlRoot("Group")] public class RuleGroup { [XmlAttribute("ID")] public int GroupID { get; set; } [XmlAttribute("Name")] public string GroupName { get; set; } [XmlAttribute("Active")] public bool Active { get; set; } [XmlElement("Rules")] public List<Rule> Rules { get; set; } }This all works fine. But now I want to base all of my classes off of a base class:
{ public abstract class _ItemBase { public ItemType Type { get; internal set; } public int ItemId { get; internal set; } private _Collection<_ItemBase> _Items = new _Collection<_ItemBase>(); public _Collection<_ItemBase> Items { get { return _Items; } internal set { _Items = value; } } }If I do this, then each object will inherit the Items collection, so in RuleRoot I no longer need Groups, and in RuleGroup I no longer