If you use a generic List<T>, you cannot combine "class A" with "class B".
You can build a Base class for "class A" and "class B".
public class Base
{
public string Name { get; set; }
}
public class A : Base
{
}
public class B : Base
{
}
List<base> aList = new List<base>;
aList.Add(new A { Name = "From Class A - 1" });
aList.Add(new A { Name = "From Class A - 2" });
List<base blist="new">;
bList.Add(new B { Name = "From Class B - 21" });
bList.Add(new B { Name = "From Class B - 22" });
List<base> abList = new List<base>;
abList.AddRange(aList);
abList.AddRange(bList);