private void InternalSet(int offset, byte valueToSet) { int ind=index+offset; // Do thin modulo (should just drop through) for(;ind>length;ind-=length); for(;ind<0;ind+=length); // Set value dataArray[ind] = valueToSet; }