Thursday, 22 August 2013

How to get keys and values from a dictionary

How to get keys and values from a dictionary

So I have a dictionary that is set up like:
Dictionary<DateTime, List<Double>>
The date and times are months I pull from an excel spreadsheet and then my
integers is the dollar amount. The columns look like this:
7/1/10 | 6/1/10
----------------
100.00 | 90.00
----------------
3.00 | 20.00
----------------
35.00 | 10.00
and so on and so forth for about 6 months. I need to get these keys and
the values. I need to put it into my database. For example for the values
100.00, 3.00, 35.00 they all coordinate with month 7/1/10 (the first key
has the 3 Values under it and etc.)
Could someone just show me how to iterate over these things? When I
debugged my dictionary put's all the info in correctly but I can't pull
them back out.

No comments:

Post a Comment