|
-
October 16th, 2009, 01:41 PM
#1
class in dictionary
Hey, i want to store multiple instances of a class inside a dictionary. I believe this is the way to do such a thing:
private Dictionary<int, aClass> childs = new Dictionary<int, aClass>();
Where 'aClass' is another .cs file in my project.
But what if i don't know what the classname is?? Is there still a way to store them in the dictionary??
I mean, i have several classfiles in my project. 'aClass', 'bClass' ... till 'zClass'.
It depends on what the users does. I want to add a class to the dictionary by the actions of a user.
So the first 2 items in my dictionary could 'aClass, aClass' and the 3rd 'lClass'.
Is it possible like that, to store different classes in a dictionary?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|