3

How to use a variable variable name in Visual Basic (.Net)?

dim test as String

test = "mysetting"

My.Settings.{test} = "something"

Which should be the same as doing:

My.Settings.mysetting = "something"
4
  • You mean construct a variable dynamicly? Commented Jun 13, 2011 at 15:05
  • I want to access a setting by a dynamic name yup Commented Jun 13, 2011 at 15:08
  • What's wrong with a dictionary? Commented Jun 13, 2011 at 15:25
  • Are dictionaries supported by application settings? Commented Jun 13, 2011 at 16:12

1 Answer 1

6

Eh?

My.Settings(test) = "something"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.