title: Finding my main executable's path using Assembly vs AppDomain
body: <p>I'm a .NET user, and my goal is as simple as finding the absolute path of the directory of my main executing assembly (the EXE file).</p>
  
  <p>I have several candidates:</p>
  
  <ul>
  <li><code>Assembly.GetExecutingAssembly().CodeBase</code></li>
  <li><code>Assembly.GetExecutingAssembly().Location</code></li>
  <li><code>AppDomain.CurrentDomain.BaseDirectory</code></li>
  </ul>
  
  <p>If to judge by the .NET documentation - I'm leaning towards <code>CodeBase</code>.
  Can anyone shed light over all three in a bit more specific terms than the .NET documentation? An example to demonstrate the difference perhaps?</p>