Access nested class methods by name as string

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mehdi Saghari
    New Member
    • Jan 2011
    • 1

    Access nested class methods by name as string

    Hi
    I have a class structor for example like this:
    Person.name.fir stname()
    Person.name.Las tname()
    Person.Father.f irstname()
    Person.Father.L astname()

    Now I want to write a method for my class to return the firstnames like this:

    Public function ReturnFirstname (methodname as string)
    return (Person."method name".firstname )
    end function

    I dont know how to use reflection technic to write this code ! please help
Working...