title: Cannot invoke an internal method within a dll
body: <p>I have this class in a ddl file:</p>
  
  <pre><code>namespace A
  {
      internal class PW
      {
          static PW()
          {
              //code
          }
  
          internal static string G(int num)
          {
              //more code
          }
      }
  }
  </code></pre>
  
  <p>However, when I call this:</p>
  
  <pre><code>using System;
  using System.Reflection;
  
  namespace PW_tester
  {
      public class Program
      {
          static void Main(string[] args)
          { 
              MethodInfo method = typeof (PW).GetMethod("G", BindingFlags.FlattenHierarchy | BindingFlags.Static | BindingFlags.NonPublic, null, new Type[] {typeof(int)}, null);     
          }
      }
  }
  </code></pre>
  
  <p>I get <code>null</code> as value of the method variable.
  That is my whole program.</p>
  
  <p>The dll file is referenced in the project and PW class is found.</p>
  
  <p>I know I cannot invoke it with</p>
  
  <pre><code>A.PW.G(0);
  </code></pre>
  
  <p>But I will get cannot access internal class/method error which at least proves that the program is aware of its existence.</p>
  
  <p>How do I call the <code>G</code> method?</p>