title: Calling a static method using a Type
body: <p>How do I call a static method from a <code>Type</code>, assuming I know the value of the <code>Type</code> variable and the name of the static method?</p>
  
  <pre><code>public class FooClass {
      public static FooMethod() {
          //do something
      }
  }
  
  public class BarClass {
      public void BarMethod(Type t) {
          FooClass.FooMethod()          //works fine
          if (t is FooClass) {
              t.FooMethod();            //should call FooClass.FooMethod(); compile error
          }
      }
  }
  </code></pre>
  
  <p>So, given a <code>Type t</code>, the objective is to call <code>FooMethod()</code> on the class that is of <code>Type t</code>. Basically I need to reverse the <code>typeof()</code> operator.</p>