reflection?

  • Thread starter Thread starter RP
  • Start date Start date
R

RP

Hi all, I am wondering if it is possible to dynamically retrieve an objects
value given a variable. Basically:

Public Class Address
Public address1, address2, city, state, zipcode as string
End Class
Dim A as Address
Dim strobjectname as string = "A.address1"

How can I retrieve value from "A" for member strobjectname? Is it possible?

TIA,
RP
 
use ctype(type.InvokeMember(sPropName, BindingFlags.GetProperty, Nothing,
obj, Nothing), String)
 

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