Hi!
I have base class:
class ARBase<T> : ActiveRecordValidationBase<T> where T : class
{
}
and few child classes
class Producent : ARBase<Producent>
{
}
class Supplier : ARBase<Supplier>
{
}
Now in other class I want to have Property of type:
public IList<ARBase<Object>> MyCollection
{
}
and want to be able to assign collection of Suppliers or collection of Producent, but I'm getting error: can't cast List<Producent>
to IList<ARBase<Object>>
...
Anyone know solution?