I am trying to execute a method whose name is stored in a string ... for example
dim a as integer = warehouse.getTotalCount("item1") 'a is now equal to 100
but what i want to do is as so..
dim item1 as string = "item1"
dim fctn = "warehouse.getTotalCount("+item1+")"
dim a as integer = run(fctn) 'and here a should be equal to 100
I have been trying to figure this out for some time now...
The functions may be coming from several different classes and I want to run the fully qualified name. How would I do this without using a case select?
EDIT: I am having trouble with
Type.GetType("warehouse")
or
Type.GetType("fctn")