Getting Field Value with Reflection?

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hello,

I'm currently using reflection to get some data from an assembly
created from a web form that has elements such as a DataGrid, DataSet,
etc. I also have a label control. Getting the fields, methods, etc
is no problem but where I'm having difficulty is obtaining the text
value assigned to the label (on the button click). I can see the
string in ilDasm.exe but having trouble picking it up with GetValue().
Any info would be appreciated.

Johnny
 
What sort of trouble are you having? Keep in mind, if you're using
Label.Text, and not the private field, you're looking at a property, not a
field, so you having to use the appropriate flags.

Chris
 

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