title: How to cast an object to type passed to a function?
body: <p>This doesn't compile, but what I'm trying to do is simply casting object to 't' which is passed to the function?</p>
  
  <pre><code>public void My_Func(Object input, Type t)
  {
     (t)object ab = TypeDescriptor.GetConverter(t).ConvertFromString(input.ToString());
  }
  </code></pre>