Looking for a .NET Linked List or Double Ended Queue

B

Brian Reed

I have a need for a queue like data structure that allows me to push onto
the front of the structure and remove from the back end. The
System.Collections.Queue will only let you push on the back and remove from
the front. Is there an existing collection or object in the .NET Framework
that I could use for this functionality? I would like to avoid having to
write one myself if possible.
 
F

Frank Oquendo

Brian said:
I have a need for a queue like data structure that allows me to push
onto the front of the structure and remove from the back end.

So you want to pop the oldest item in the collection? Isn't that exactly
what the Queue does?

If you want to pop the newest item in the collection, use the Stack
instead.

However, if it's random access you're wanting neither of these classes
will do.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top