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,
Good old List will do it.
List
Add() to enqueue, Insert(0,T) to push, Remove(0) to pop/dequeue.
Add()
Insert(0,T)
Remove(0)