title: Showing images into a list view
body: <p>I am writing a code in C# to show the unknown number of images from a specified folder into a "listview" I don't know how to get all the files present in that specific folder.
  I know I have to use a loop and array but I don't know how. 
  Here is the code which I use to access files with the "known name of file".
  It's a windows form app.</p>
  
  <pre><code>private void btnZoom_Click(object sender, EventArgs e)
  {
      ImageList imgs = new ImageList();
      imgs.ImageSize = new Size(100, 100);
  
      string[] paths = { };
      paths = Directory.GetFiles("TestFolder");
  
      try
      {
          foreach (string path in paths)
          {
              imgs.Images.Add(Image.FromFile(path));
          }
      }
      catch (Exception ex)
      {
          MessageBox.Show(ex.Message);
      }
      listView1.SmallImageList = imgs;
      listView1.Items.Add("2",0); 
  }
  </code></pre>