You can use reflection, but since the type of the returned list is unknown at compile time, code using the returned list must access the elements through the interface with little precision.
This will not lead to accelerated or supported code using just a list.
The best solution is to create a <interface> list where <interface> is the strongest common interface or base class of all types that you could add to the list at runtime. At least this way you wonβt have to convert back and forth from the object when working with members of the list, and you will have some time checking to sort the things you put into the list.
source share