title: Looping through an array without throwing exception
body: <p>Say I have an array of values:</p>
  
  <pre><code>string[] text = new string[] { "val1", "val2", "val3", "val4", "val5" };
  </code></pre>
  
  <p>Then I have a basic loop:</p>
  
  <pre><code>for (int i = 0; i &lt;= 30; i++)
  {
      Console.WriteLine(i + " = " + text[i])
  }
  </code></pre>
  
  <p>Obviously, this will cause an out of bounds exception, so what I want to do is when the counter reaches the upper bound of the array then go back to the start.</p>
  
  <p>So</p>
  
  <pre><code>0 = val1    
  1 = val2    
  2 = val3    
  3 = val4    
  4 = val5    
  5 = val1    
  6 = val2    
  7 = val3    
  etc..
  </code></pre>