Reflection to get Variable Names and Values

Hi

I have a function as such

Public Function Test as string
    Dim i as integer = 5
    Dim s as string = "testing"

End Function

In that function how could i use reflection to get all the variables and values that exist inside this function.

So using a command i could get a string that says
i - Integer - 5
s - String - "testing"

or something similar

Thanks
Adam
LVL 4
adam_pedleyAsked:
Who is Participating?
 
armoghanCommented:
0
 
armoghanCommented:
Hi adam_pedley,
This will help you
http://www.dotnet247.com/247reference/msgs/35/177502.aspx

Cheers!
0
 
armoghanCommented:
0
 
adam_pedleyAuthor Commented:
Brilliant!

Thank you

Im not using 2005 yet but am in the middle of an upgrade to 2005.

I must say .NET 2.0 has really got its act together.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.