Looking for a .NET Linked List or Double Ended Queue

  • Thread starter Thread starter Brian Reed
  • Start date Start date
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.
 
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.
 
Back
Top