avoid hard coding path in ReadAllText
<p>My exact file path is as follows. This .txt file is not supposed to be deployed to bin/debug</p>

<pre><code>string str = File.ReadAllText(@"C:\development\slnfolder\projfolder\myfile.txt");
</code></pre>

<p>How can I write the code so that I do not have to hard code full path to get to the file </p>

<p>I am trying to avoid hard coding path in the above line of code as follows:</p>

<pre><code>string file = @"myfile.txt";
string str = Path.GetFullPath(file);
</code></pre>

<p>but the str ends up being as follows and is not able to find the file.</p>

<blockquote>
  <p>C:\development\slnfolder\projfolder\bin\debug\myfile.txt</p>
</blockquote>
