c# stack queue combination

c#, containers, queue, stack

Solution

Check the LinkedList class.

LinkedList<int> list = new LinkedList<int>();

list.AddFirst(1);
list.AddLast(2);
list.AddFirst(0);

Problem

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, or to the front of the queue thanks

Original source