recursiveContradiction recursiveContradiction - 1 year ago 80
C# Question

Need a two dimensional [string][int] array to strore DateTimes

I can not find anywhere a two dimensional [string][int] array which could assign many DateTime for a string.


Answer Source

Sounds like you want to use a dictionary of Lists, like so

var dict = new Dictionary<string,List<DateTime>>();

then you add lists for a string like so:

dict["Branch"] = new List<DateTime>();

and add dates like so:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download