cycling through an array

rzelko:
I'm a bit confused as to how to add the bounds-checking code that was suggested.

if (cycleCondition == true)
{
  if (stationIndex < 5) // for an array of 5 stations array size is 6 (for the null)
  {
    stationIndex++;
  }
  else
  {
    stationIndex = 0;
  }
}