title: How to set the path of an input file in Console application?
body: <p>I am facing a problem in setting the path of input ".txt" file. I am reading the contents of the file and modifying the contents. So how can I set the path so that it will work for any computer(if someone will simply paste the project and try to run it.) </p>
  
  <p>I have tried following options.</p>
  
  <pre><code>1) var path = Environment.CurrentDirectory + @"\input.txt";
  2) var path = "input.txt";
  </code></pre>
  
  <p>But I am getting a run time DirectoryNotFound exception.  For </p>
  
  <pre><code>var path = @"D:\Projects\Demo Project\C#\Problem1\Problem1\input.txt" ;
  </code></pre>
  
  <p>It is working fine. But it will work only for this directory structure.</p>
  
  <p>I need something like:- ResolveUrl("~/input.txt"); So that it will work for every case. </p>