加载一个DateTime数组列表框?
-
13-09-2019 - |
题
如何我保存Properties.Settings.Default.Array使用DateTime格式(只与时间)?
解决方案
行,我发现这个
添加一种设置,类型选择浏览和查找System.Collection.ArrayList。
用于保存的值
if (Properties.Settings.Default.test == null)
Properties.Settings.Default.test = new System.Collections.ArrayList();
Properties.Settings.Default.test.Add(new DateTime(2009, 1, 1));
Properties.Settings.Default.Save();
有retrieveing值
System.Collections.ArrayList list = Properties.Settings.Default.test;
for (int iDate = 0; iDate < list.Count; iDate++)
{
DateTime dateValue = (DateTime)list[iDate];
}
看一看使用C#中设置一>
不隶属于 StackOverflow