I'm currently using the following for counting forwards and backwards through an array depending on the current index.
If the index increments past the end of the array it now decrements and vice versa.
isReversed = isReversed ? index - 1 != -1 : index + 1 == array.Length;
index = isReversed ? --index: ++index;
Can this approach be improved upon or have I tackled it in a reasonable manner?