In Bizerrely, the stack collection seems to skip the pretty basic shift and offset methods *, and I work in 2.0, so I can't just extend them.
Is there a reasonable technique or alternative collection class to get these methods? I also need a push and pop.
Edit: it looks like the collection I want is really a deque , which, fortunately, is not native to C # :(
Currently I can’t use third-party libraries, so I will go with the awkward LinkedList (I say clunky, because reading and deleting are two operations in which the change will be one), but I think I recommend PowerCollections approach to anyone who could use it. Or better yet by switching to extension methods.
sigh
* Apologies, I did not understand that these were unusual terms, I thought that I simply did not know where to find them in the API. For reference:
shift = delete first element
unshift = insert element at the beginning of the collection
source
share