title: How to get the path of app(without app.exe)?
body: <p>I want to get the path of my app like: "\\ProgramFiles\\myApp", I try to use the following code:</p>
  
  <pre><code>
  string path = System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase;
  </code></pre>
  
  <p>But it returns a path which has "\\myapp.exe" at the end.</p>
  
  <p>I also tried:</p>
  
  <pre><code>
  string path = System.IO.Directory.GetCurrentDirectory();
  </code></pre>
  
  <p>But it throws an “NotSupportedException”.</p>
  
  <p>Is there any way to get a path without .exe at the end?</p>