title: How does the MethodImplAttribute work in .NET?
body: <p>I was investigating some framework code (the System.AppDomain.GetDynamicDir method) and this was all the assembler showed:</p>
  
  <pre><code>[MethodImpl(MethodImplOptions.InternalCall)]
  private extern string GetDynamicDir();
  </code></pre>
  
  <p>What happens when this method is called? I don't mean this specific method, but methods with this attribute in general.</p>