Multi-dimensional array

K

KGriffin

Hello,

I want to store values from several text boxes into a "list" and
associate a string with each value. should i use a multi dimensional
array, and how do i use it?

Thanks,
k
 
D

David Browne

KGriffin said:
Hello,

I want to store values from several text boxes into a "list" and
associate a string with each value. should i use a multi dimensional
array, and how do i use it?

Probably not. Multi dimensional arrays are clumsy to work with. Probably
you should use an System.Collections.ArrayList or a
System.Collections.Hashtable or both.

David
 
H

Herfried K. Wagner [MVP]

KGriffin said:
I want to store values from several text boxes into a "list" and
associate a string with each value. should i use a multi dimensional
array, and how do i use it?

You can store arbitrary data in each controls' 'Tag' property, and then use
a one-dimensional array of 'TextBox', for example.
 
K

KGriffin

thanks alot, David
Hello,

I want to store values from several text boxes into a "list" and
associate a string with each value. should i use a multi dimensional
array, and how do i use it?

Thanks,
k
 
K

KGriffin

what a great idea! thanks.
Hello,

I want to store values from several text boxes into a "list" and
associate a string with each value. should i use a multi dimensional
array, and how do i use it?

Thanks,
k
 
G

Guest

Further to the other suggestions,
you could create a class that holds a ref to each textbox, or the actual
textbox.text values, and then store those objects in a arraylist or hashtable

htht

guy
 

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

Top