I have a class called TabularSectionManager and each Manager linked to TabularBusinessObject.
public abstract class TabularSectionManager<T1> : where T1 : TabularBusinessObject
{
public TabularSectionManager()
{
}
public T1 LinkedTabularBusinessObject { get; set; }
}
public class PhoneManager : TabularSectionManager<PhoneBo>
{
public PhoneManager()
{
}
}
public class PhoneBo : TabularBusinessObject
{
public PhoneBo()
{
}
}
Finally, there is another class stores collection of TabularBusinessObjectManager List.
Compiler is complaining here regarding conversion:
List<TabularSectionManager<TabularBusinessObject>> TabularSections { get; set; }
TabularSections.Add(new PhoneManager());
Error CS1503 Argument 1: cannot convert from "PhoneManager" to "TabularSectionManager< TabularBusinessObject >".
Could you pls advice on that?
Thanks.