Is is possible to remove elements from the middle of a System.Collections.Queue?

D

Daniel

Is is possible to remove elements from the middle of a
System.Collections.Queue? For the most part i just use endqueue and dequeue
but there are points where i know that i no longer need certain elements
that could be in the middle of the queue that i would like to clean out of
the queue. however, my queue size is gigabytes large and i cant afford the
time to reallocate the entire queue just to remove a middle element. do i
need to write my own link list sytle queue class or is there a way to just
remove items out of the middle of a System.Collections.Queue?
 
P

Patrick A

You should probably reconsider which data structure you are using,
because, by definition, a queue only has enque and dequeue operations.
 
D

Daniel

thats fine. so is there another datastructure that has the characteristics
of a queue and the characteristics of an arraylist? I fail to see why these
are sepperated, seems an unessicary limitation
 

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