I want to create a c# data structure that will have a variable number of columns, and a variable number of rows. I will insert values into the 'cells'. I want to be able to index both the columns and the rows using strings, not integers, so that I can address these cells as follows: infotable("pete","monday")=3, or infotable("mike","friday")++. When I encounter either a column name or row name that does not yet exist then I will add it to the structure.
I have pondered using nested collections, but then I will not have a guarantee that each nested collection will contain the same keys as all the other nested collections (unless I manage things manually). I have pondered using DataTables, but then I can't index rows using strings.
What is the neatest way to address my requirement?
Thanks.