How to cast an object to a Type extracted at runtime
问题 I am using reflection to get an object's type, or for this issue an object that has instance properties type, at runtime and then I need to change an existing variable's type into that newly found type. Is this possible? For example, the following code does not work in the line indicated within: Public Sub DoSomething(x As T, y As T, exp As String) 'This is a instance property on the object of a different type 'i.e. 'T.AnotherType' We need to reflect to find out what type of object