title: Check if the method uses PInvoke
body: <p>Is there anyway to check if a method uses PInvoke ?
  I'm looping through all the methods in an assembly using MethodBase but I want to check if the method is using PInvoke.
  Here is the code I'm using :</p>
  
  <pre><code> foreach (MethodBase bases in mtd.GetType().GetMethods())
   {
        //check if the method is using pinvoke
   }
  </code></pre>
  
  <p>Also if it is possible how can is there a way I can check for the DLL being used and the function/entrypoint that is being called?</p>