title: Using get type and then casting to that type in C#
body: <p>I have code like:</p>
  
  <pre><code>var t = SomeInstanceOfSomeClass.GetType();
  ((t)SomeOtherObjectIWantToCast).someMethodInSomeClass(...);
  </code></pre>
  
  <p>That won't do, the compiler returns an error about the (t) saying Type or namespace expected.
  How can you do this?</p>
  
  <p>I'm sure it's actually really obvious....</p>