Right now I have a 2d string array holding my data:
//...find number of rows needed... string[,] data = new string[totalRows, 12]; //row / column It works. BUT now that I want to add more functionality to my program, it's no longer in my benefit since concatenating 2d arrays, while doable, opens up other issues: up until this point I was storing the number of rows in a class variable since I hadn't needed to maintain two at once. Arguably I know that columns is always going to be the same, and I could divide length by that to get rows and write a method to combine them.
I get the feeling that there's a better way to go about this. My knowledge of "newer" stuff is lacking, but I am sure one of them fits the bill better than others. So before I jump in and create List<List<String>> data = new List<List<String>>(); or something else equally weird to look at, I want the opinions of others more experienced.
I do not need any sorting, removing, inserting, etc. functions. I just need it to hold data; and now I need to be able to relatively easily go data += data2 --something to that effect, anyway. data.Length (giving only the outside length) would also be very useful.
What is the best way to go about this?
Please let me know if you would like any more information. Thanks.
More Info based on answers:
The data is basically of a spreadsheet format. ie.
[['1234-56789-12345', 'screwdriver', '', 'ea', '1', '', '', '', '', '', '', ''], [['1234-56789-54321', 'wrench', '', 'ea', '1', '2', '3', '', '', '', '', '']] I do not want to deal with figuring out what the information is describing--I don't care. I need the location relative to everything else.
More info yet:
Usage is as a holding tank between one xml file and another. Just realized that those xlst things might be another solution to my initial problem, but eh. Maybe in another life. (Everything is working.. like I said, adding functionality. If it works, why break it?)
List<List<string>>would work just fine. Can you think of any operations you'd like to do that wouldn't be straightforward using that?