Gavin Tranter wrote:
Therefore in your example you should replace myClass with Class, as Class is the type of the objects you plan to store in the list.
Are you saying
List<Class> peopleList = (List<Class>)anotherList;
But this can't help me. My goal is to dynamically cast a list to another list based on its Class type.
The perfect solution for me will be something like this
How to work out ?
Thanks.