Home All Groups Group Topic Archive Search About
Author
16 May 2006 5:12 PM
scoffer
Hi all,

i need to acces the methods of a class using a variable.
Try to explain better my needs:

I have a class with undreds of methods, and i have, in a database, wich of
this method i must use.
Can I access the method with a string variable??

Sample:
My class "class" have this methods "one", "two", "three", "four" and "five".

I've on a database table this record:
UseClass = "three"

Can I access the moethod in a way like "class"."UseClass" so i can invoke
the method "three"??


Help please.

Author
16 May 2006 7:07 PM
tomb
scoffer wrote:

Show quoteHide quote
>Hi all,
>
>i need to acces the methods of a class using a variable.
>Try to explain better my needs:
>
>I have a class with undreds of methods, and i have, in a database, wich of
>this method i must use.
>Can I access the method with a string variable??
>
>Sample:
>My class "class" have this methods "one", "two", "three", "four" and "five".
>
>I've on a database table this record:
>UseClass = "three"
>
>Can I access the moethod in a way like "class"."UseClass" so i can invoke
>the method "three"??
>
>
>Help please.
>
>

>
Use the Assembly class to get the module containing the class you want,
then use the module to get the method you want using a string variable.

T