title: How do I populate a list of Images from a directory?
body: <p>trying to load in a bunch of images into a list from a directory...my code is below.</p>
  
  <pre><code>        string directory = @".\card_images\";
          List&lt;Image&gt; HandCards = new List&lt;Image&gt;();
  foreach (string myFile in 
           Directory.GetFiles(directory,"*.png",SearchOption.AllDirectories))
          {
              HandCards.Add(myFile);
          }
  </code></pre>
  
  <p>This of course doesn't work because a string can't be converted to an Image, on the other hand if I try to make myFile into Image then Directory.GetFiles doesn't work either, any help would be appreciated.
  Thanks!</p>