c# Adding a Remove(int index) method to the .NET Queue class

前端 未结 12 1683
攒了一身酷
攒了一身酷 2021-01-07 17:14

I would like to use the generic queue class as described in the .NET framework (3.5) but I will need a Remove(int index) method to remove items from the queue. Can I achieve

12条回答
  •  长情又很酷
    2021-01-07 17:38

    In fact, this defeats the whole purpose of Queue and the class you'll eventually come up with the will violate the FIFO semantics altogether.

提交回复
热议问题