G
Guest
Hi all,
I have a class which holds a collection. The collection contains objects and at runtime all objects in the collection are of the same type. For example, the collection will hold cName classes, or cAddress classes.
What I can't figure out is how to create a new class of the same type as the first class in the collection.
For example, in the class holding the collection I have a method AddNew which needs to find out what type of classes the collection is holding (names, addresses, etc.), then create a new one and add it to the collection.
Any ideas are much appreciate, and thank you for your time reading this post.
Regards
Darren
I have a class which holds a collection. The collection contains objects and at runtime all objects in the collection are of the same type. For example, the collection will hold cName classes, or cAddress classes.
What I can't figure out is how to create a new class of the same type as the first class in the collection.
For example, in the class holding the collection I have a method AddNew which needs to find out what type of classes the collection is holding (names, addresses, etc.), then create a new one and add it to the collection.
Any ideas are much appreciate, and thank you for your time reading this post.
Regards
Darren