C# loop string array error
<p>Ok I am confused by this, I have: a int variable a string array and a statement that all should would. Its pretty standard looping array structure. </p>

<pre><code>public class Form1 : System.Windows.Forms.Form
{

    public int ticker = 0;
    public string[] pictureArray = new String[] {
            "image01.jpg",
            "image02.jpg",
            "image03.jpg",
            "image04.jpg",
            "image05.jpg",
            "image06.jpg",
            "image07.jpg",
            "image09.jpg",
            "image10.jpg",
            "image11.jpg",
            "image12.jpg",
            "image13.jpg",
            "image14.jpg",
            "image15.jpg",
            "image16.jpg",
            "image17.jpg",
            "image18.jpg",
            "image19.jpg",
            "image20.jpg",
            "image21.jpg",
            "image22.jpg"
        };
...
        if (this.ticker &lt; 21)
        {
            this.ticker++;
        }
        else
        {
            this.ticker = 0;
        }

        MessageBox.Show(pictureArray[ticker]);
</code></pre>

<p>It runs fine until ticker is > 21 then it crashes and states IndexOutOfRange but if I were to say change the MessageBox to just print ticker it is fine and I have no error. Now I have looked through similar questions but the problem is that I am a PHP programmer and I am not sure on some of them if the answers pertain to my situation. </p>

<p>Any help will be greatly appreciated, I think that I have all of the relevant information here if not I apologize. But everything works until it starts to recycle the array and run through the array again. I am just baffled.   </p>
