c# stack queue combination

前端 未结 5 1697
南方客
南方客 2020-12-29 23:25

is there in C# some already defined generic container which can be used as Stack and as Queue at the same time? I just want to be able to append elements either to the end,

5条回答
  •  醉梦人生
    2020-12-30 00:15

    What you want is a linked list - there's one in the BCL - that has AddFirst and AddLast methods

提交回复
热议问题