How to open the last modified document in a file?
<p>I'm new with C#. I have this piece of code and have no idea why it does not work.</p>

<p>I have a document in a <code>file</code>, I don't have the <code>file name</code>, but i do know it is the most recently changed <code>file</code> in this directory.</p>

<p>I want to open it (actually i just copy and past it in an another folder) but I am not sure this file is selected (because i can't open it)</p>

<p>Thank you.</p>

<pre><code>private void export_Click(object sender, EventArgs e)
{
    var directory = new DirectoryInfo(@"C:\Users\Admin\files");
    var myFile = (from f in directory.GetFiles() 
        orderby f.LastWriteTime descending select f).First();
    myFile.OpenRead();
}
</code></pre>

<p>(<strong>PS</strong>: <code>System.Diagnostics.Process.Start(myFile)</code> don't work as well said invalid argument, i don't know  why ...)</p>