I have one List A which always has 7 elements.
There is another List B which can have a variable size but let's assume for now it's size is 5 and it has the elements {a,b,c,d,e}. Now I need to cycle those elements of list B in the "slots" of list A left or right, always by 1 position.
So, initially List A will be {a,b,c,d,e,null,null}. If the shift is left, after 1 iteration, it should look like {b,c,d,e,null,null,a}, after 2 iterations {c,d,e,null,null,a,b} etc. If the shift is right, after 1 iteration it would be {null,a,b,c,d,e,null}, after 2 iterations {null,null,a,b,c,d,e} etc.
If the List B is greater in size than A (e.g. {a,b,c,d,e,f,g,h}), after shifting left, List A might be {b,c,d,e,f,g,h} and after shifting right, {h,a,b,c,d,e,f}.
I've spent a lot of time trying to do that using temporary variables or lists but it always fails one way or another. My C# knowledge is also pretty basic at this point. If anyone could give me some guidance, that would be great.