LookitsPuck
Active member
- Joined
- Jan 23, 2007
- Messages
- 37
- Programming Experience
- 3-5
Alright, I have a queue of objects that I'd like to implement with an ID as the key.
Right now I'm using a Dictionary object, but it's not giving me the functionality I want (FIFO). I can't use a list, because there's no key that I can use there to access the object.
Basically, I have a list of people waiting in line with certain IDs. I have processes that remove them from line based on their ID rather than iterating through, getting a reference to that object, then removing it via that (I could use a Generic list to do that).
Right now, I'm using a Dictionary object (Generic Dictionary) which allows me to use the key to access/add/remove the object, but the objects are not added or listed the way I plan them to be.
Is there an object that I'm overlooking? Something custom I need to create? Or something someone already created?
Basically I'm looking for the FIFO power of a List, with the immediate lookup of a Dictionary which has a key to access the object and the object stored at that key location.
Thanks
-Steve
Right now I'm using a Dictionary object, but it's not giving me the functionality I want (FIFO). I can't use a list, because there's no key that I can use there to access the object.
Basically, I have a list of people waiting in line with certain IDs. I have processes that remove them from line based on their ID rather than iterating through, getting a reference to that object, then removing it via that (I could use a Generic list to do that).
Right now, I'm using a Dictionary object (Generic Dictionary) which allows me to use the key to access/add/remove the object, but the objects are not added or listed the way I plan them to be.
Is there an object that I'm overlooking? Something custom I need to create? Or something someone already created?
Basically I'm looking for the FIFO power of a List, with the immediate lookup of a Dictionary which has a key to access the object and the object stored at that key location.
Thanks
-Steve