I have base class that is called Entity. Then I have two child class Tag, and Property that inherits from Entity. Now I want to have dictionary that stores a List of Entity. But I cannot get it to work. Have a done the inheritance wrongly?
Dictionary<string, List<Entity>> baseDict = new Dictionary<string, List<Entity>>();
List<Tag> tags = new List<Tag>();
tags.Add(new Tag("2012"));
tags.Add(new Tag("hello"));
tags.Add(new Tag("lego"));
List<Properties> properties = new List<Properties>();
properties.Add(new Properties("Year"));
properties.Add(new Properties("Phrase"));
properties.Add(new Properties("Type"));
baseDict.Add("Tags", tags);
baseDict.Add("Properties", properties);