Hi Folks
OK so I'm working on an application where I move data around from one text box to another, and part of what I need to do is keep a record of what data moved from one TextBox to the other.
Since I come from a VB background I figured I would just create a 2-dimensional array and store the Data Text, Starting Box and Ending box as such: X,0 = Data Text, X,1 = Starting Box, X,2 = Ending box where X is the first dimension of the array. To add 'records' I would just ReDim the array and add onto it.
But as I've recently learned you cannot easily (if at all) redimension a multidimensional array in C#. I could simply declare that array to hold the maximum number of possible moves and just deal with the memory overhead, but I'd rather learn something.
I thought about trying to use the ListOf<I> collection but this does not seem to allow more than one value per line. Likewise a Hash Table is just a key/value type of thing.
Any thoughts on what I could do with this? I suppose I could just use a hashtable with one string per unique key that has comma-separated values for the rest of the data, but is there another better option I have not yet discovered?
Thanks
Craig
OK so I'm working on an application where I move data around from one text box to another, and part of what I need to do is keep a record of what data moved from one TextBox to the other.
Since I come from a VB background I figured I would just create a 2-dimensional array and store the Data Text, Starting Box and Ending box as such: X,0 = Data Text, X,1 = Starting Box, X,2 = Ending box where X is the first dimension of the array. To add 'records' I would just ReDim the array and add onto it.
But as I've recently learned you cannot easily (if at all) redimension a multidimensional array in C#. I could simply declare that array to hold the maximum number of possible moves and just deal with the memory overhead, but I'd rather learn something.
I thought about trying to use the ListOf<I> collection but this does not seem to allow more than one value per line. Likewise a Hash Table is just a key/value type of thing.
Any thoughts on what I could do with this? I suppose I could just use a hashtable with one string per unique key that has comma-separated values for the rest of the data, but is there another better option I have not yet discovered?
Thanks
Craig