需要一个二维[string][int]数组来存储日期时间
本文关键字:int 时间 数组 存储 string 日期 二维 一个 | 更新日期: 2023-09-27 18:06:22
我找不到一个二维[string][int]数组可以为一个字符串分配多个DateTime
。
的例子:
Array["Branch"].Add(Date);
听起来像是要使用list的字典,像这样
var dict = new Dictionary<string,List<DateTime>>();
则为字符串添加如下列表:
dict["Branch"] = new List<DateTime>();
并添加如下日期:
dict["Branch"].Add(Date);