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)
 
Back
Top