title: Empty Path Name Is Not Legal
body: <p>So I'm trying to compile an Asteroids game. It's almost working, all the files are in place etc etc...</p>
  
  <p>The issue comes when it hits this code.</p>
  
  <pre><code>FileStream myFileStream = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read);
  string myTempFile = @"F:\Documents\Junior School\Computer Programming (Java 1)\AsteroidsWithSound\AsteroidsWithSound\temp\mysound" + i.ToString() + ".wav";
  </code></pre>
  
  <p>It gives me an Error/Warning, not sure exactly what it is called but it says</p>
  
  <p>ArgumentException was unhandled.
  Empty path name is not legal.</p>
  
  <p>I've read online about chunks of code like this causing this issue but could never find a resolution. Any help would be awesome.</p>
  
  <p>EDIT: Filename is defined in this chunk.</p>
  
  <pre><code>string filename = this.Player.FileName;
  this.Player.Open("");
  File.Delete(filename);
  this.isReady = true;
  </code></pre>