So in C# when I do -1%something I get -1, which means I can't really use it as an array index without a bunch of stupid error checking. Is there some way to force the modulo operator to actually give me numbers from my field (e.g 0-5 for modulo 6)

Edit: Well, I made this post at 2:00 am and it shows, here is what I have issue with:

i = (i+1) % 6 will result in numbers from 0 to 5, which I could use for an array index

i = (i-1) % 6 will result in numbers from 0 to -5, which can't be used in an array index

Obviously, the absolute value of those results would not conform to any logical value, either (for instance, array[-1] and array[1] would be the same value, even though they should be 2 values apart if I decremented twice from 1 to get to -1).

What I want is a more traditional (in my mind) modulo operator, which gives me only positive remainders. Obviously I can work around this myself with some conditionals, but I'm looking for an elegant and maintainable solution...