I have the following data set and would like to store the three arrays in one variable for lookup.
name date size
aaa 201201 0.82
bbb 201306 1.04
ccc 201209 0.91
................
How do I store all the information in one variable? There are hundreds of rows. I am working with C#. I need to be able to search through the variable. For example, if time = 201201, name = aaa, then the size is 0.82.
EDIT: I modified my original answer to be able to search by
nameanddateand getsize.You could use the
Tupleclass like this:This approach assumes that the combination of
nameanddateis unique, like an index. You can easily search by index, then.If you need to search name/date by size, though, the wrapper class approach
Adrian Carneirosuggested is probably better.