store "N" number of records within an array of a fixed size
<p>Is it possible to store within an array a rolling set of values without exceeding the set index?</p>

<p>For example I put together a basic console example at as follows: </p>

<pre><code>static void Main(string[] args)
{
    int[] myvalue;
    myvalue = new int[10];

    for (int i = 0; i &lt; 20; i++)
    {
        Console.WriteLine("Array {0} is {1}", i, myvalue[i]);         
    }
    Console.ReadLine();

}
</code></pre>

<p>In the current approach I get an index out of bounds exception. What I would like to do is to limit the array to 10 items but as the count increases overwrite the existing items with new values. Therefore I could iterate through 100 times but the array would only show the last ten values (89-99) at the end of the routine.</p>

<p>If an array is not the best approach I would welcome any suggestions as to how to store this in memory. </p>

<p>thank you</p>
