0

hope someone can help me with this:

Is something like this possible in VB.net:

Dim XYZ() as String
xyz("FRIST_ENTRY") = "MESSAGE"

And use this later like:

Button.Text = xyz("FIRST_ENTRY")

1 Answer 1

2

AFAIK there are no associative arrays in Vb.Net. I think you should use a Dictionary with a string as Key.

The initialization should be like:

Dim myNewDictionary As new Dictionary(Of string, string)

Then you can just add items to it using .add():

myNewDictionary.Add("someStringAsKey", "someStringAsValue")

Microsoft docs entry about the Dictionary: https://learn.microsoft.com/es-es/dotnet/api/system.collections.generic.dictionary-2?view=netframework-4.7.2

PS. Sorry about any misspellings or typos, English is not my main language.

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.