Public property List needs to Concat 2 types with inheritance
- by Bernard
I have 2 lists: one of type A and one of type Aa. type Aa is inherited from type A.
So:
List<A> listA = new List<A>();
List<Aa> listAa = new List<Aa>();
with
class Aa : A
I have:
public property Lists<A>
{
get
{
List<A> newList = new List<A>();
//return concat of both lists
…