Multi-dimensional array

  • Thread starter Thread starter KGriffin
  • Start date Start date
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
 
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
 
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.
 
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
 
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
 
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
 
Back
Top