Retrieving Only File Name from a Directory
<p>Using Directory class library I am trying to retrieve all files Name existing in a Folder as below:</p>

<pre><code> private void button1_Click(object sender, EventArgs e)
     {
        string[] filePaths = Directory.GetFiles(@"d:\Images\", "*.png");
        foreach (string img in filePaths)
        {
          listBox1.Items.Add(img.ToString());
        }
    }
</code></pre>

<p>As you know this method returns Full path and name of the file but I need to get ONLY the name of files.Is it possible to do this in Directory Class? Do I have to use the Path class for this? if yes, how I can assign a path to a variable without file name?
Thanks,  </p>
