We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Reflection to get Variable Names and Values

adam_pedley
adam_pedley asked
on
Medium Priority
1,492 Views
Last Modified: 2008-02-01
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
Comment
Watch Question

Commented:
Hi adam_pedley,
This will help you
http://www.dotnet247.com/247reference/msgs/35/177502.aspx

Cheers!

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

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.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.