This is what I need to do:
object foo = GetFoo(); Type t = typeof(BarType); (foo as t).FunctionThatExistsInBarType();
Can something like th
You can use the Convert.ChangeType method.
object foo = GetFoo(); Type t = typeof(string); string bar = (string)Convert.ChangeType(foo, t);