C# optimal way to populate a List<Class> from List<string>
<p>I have very simple code which explains itself.</p>

<pre><code>List&lt;string&gt; Files = new List&lt;string&gt;( Directory.EnumerateFiles(PathLocation));
</code></pre>

<p>However I now wish to make life complicated and I have a file object.</p>

<pre><code>public class File
{
    public int FileId { get; set; }
    public string Filename { get; set; }
}
</code></pre>

<p>Is there an optimal way to populate the string property of the class, ie is there a better way than using a foreach loop or similar?</p>
