title: How do I find the parent directory in C#?
body: <p>I use this code for finding the debug directory</p>
  
  <pre><code>public string str_directory = Environment.CurrentDirectory.ToString();
  </code></pre>
  
  <p><em><code>"C:\\Users\\Masoud\\Documents\\Visual Studio 2008\\Projects\\MyProj\\MyProj\\bin\\Debug"</code></em></p>
  
  <p>How can I find the parent folder as shown below?</p>
  
  <p><em><code>"C:\\Users\\Masoud\\Documents\\Visual Studio 2008\\Projects\\MyProj\\MyProj"</code></em></p>