I have a list with 5 elements…What I want to move foward all elements, removing the last one and add a new value to the first one. Is there any pre-made list methods that do that or help me so?
Like a Queue
I have a list with 5 elements…What I want to move foward all elements,
Share
You can use
Queue<T>Edit: Your wording can be interpreted a couple different ways but if you want a first in first out behavior then use a
Queue<T>. If you want a first in last out behavior then use aStack<T>.