How can i add to the List<string> the last file from the directory?
<pre><code>if (Form1.sf != null)
{
    radarDI = new DirectoryInfo(Form1.sf);
    radarFiles = radarDI.GetFiles("*.png");
    for (int i = radarFiles.Length; i &gt; 0; i--)
    {
        myGifListRadar.Add(radarFiles[i].Name);
    }
}
</code></pre>

<p>radarFiles contain 224 files. I want to add to the <code>myGifListRadar List&lt;string&gt;</code> the last 5 or any last number of files from the end of files on the hard disk.</p>

<p>If im doing for <code>int I = 0 ; I &lt; test.Length; I++</code> it will add:</p>

<blockquote>
  <p>00001.png</p>
  
  <p>00002.png</p>
</blockquote>

<p>I want it to add from the end:</p>

<blockquote>
  <p>00224.png</p>
  
  <p>00223.png</p>
</blockquote>

<p>and so on...So I tried to change the FOR to as it is now but im getting exception out of bound :</p>

<blockquote>
  <p>Index was outside the bounds of the array</p>
</blockquote>

<p>Whats wrong with the FOR ?</p>
