title: How to use drag and drop feature of console application and streamreader
body: <pre><code>    static void Main(string[] args)
      {
          string path = Console.ReadLine();
          using (StreamReader sr = new Streamreader(path);
          {
             \\ do something with the file
          }
      }
  </code></pre>
  
  <p>Hi, I'm trying to allow the user to drag and drag a txt file into the console, have it read the path, and then parse information from the file.</p>
  
  <p>However I'm getting: </p>
  
  <p>An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll</p>
  
  <p>Additional information: Illegal characters in path.</p>
  
  <p>when I run my code. I think I can solve it by formatting the file path before using it, but that doesn't seem like the "intended solution". Is there somthign simple that I'm missing?</p>
  
  <p>Thanks.</p>