Method Access

  • Thread starter Thread starter scoffer
  • Start date Start date
S

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.
 
scoffer said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top