vb.net - TryCast using an indirect type? -


is there anyway specify object type trycast indirectly? example of i'd (note: not work - syntax error saying "type 't' not defined".)

public sub foo()     dim somobject new object      each t type in assembly.getexecutingassembly().gettypes()         trycast(somobject, t)     next  end sub 


Comments