title: Can you pass a "type" as an argument?
body: <p>I want to do something like the following in VB.NET, is it possible?</p>
  
  <pre><code>Function task(value as Object, toType as Type)
  
     Return DirectCast(value, toType)
  
  End Function
  </code></pre>