title: C# GetFiles with Date Filter
body: <p>Is there a more efficient way to populate a list of file names from a directory with a date filter? </p>
  
  <p>Currently, I'm doing this:                 </p>
  
  <pre><code>foreach (FileInfo flInfo in directory.GetFiles())
  {
      DateTime yesterday = DateTime.Today.AddDays(-1);
      String name = flInfo.Name.Substring(3,4);
      DateTime creationTime = flInfo.CreationTime;
      if (creationTime.Date == yesterday.Date)
         yesterdaysList.Add(name);
  }
  </code></pre>
  
  <p>This goes through every file in the folder, and I feel like there should be a more 
  efficient way.</p>