I have a class
public class BaseHeaderFooterItem
{
public string Title { get; set; }
public string EnTitle { get; set; }
public HyperLink Link { get; set; }
public int Level { get; set; }
public HyperLink MobileLink { get; set; }
}
Many other class inherit from him I want to have on generic list in the class BaseHeaderFooterItem that will be able to hold a list from any type of the inherited classes. something like this:
public class BaseHeaderFooterItem
{
public string Title { get; set; }
public string EnTitle { get; set; }
public HyperLink Link { get; set; }
public int Level { get; set; }
public HyperLink MobileLink { get; set; }
public List<T> Descendants { get; set; }
}
How can I do it ?
List<BaseHeaderFooterItem>will do.BaseHeaderFooterItemor only items of that derived class?