C# calling a static method using a Type
<p>How do I call a static method from a Type, assuming I know the value of the Type 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 Type t, the objective is to call FooMethod() on the class that is of Type t. Basically I need to reverse the typeof() operator.</p>
