Pergunta

Como posso salvar um Properties.Settings.Default.Array usando DateTime formato (apenas com o tempo)?

Foi útil?

Solução

OK, eu encontrei este

Adicionar uma configuração, digite selecione Procurar e localize System.Collection.ArrayList.

para salvar os valores

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();

para retrieveing ??os valores

System.Collections.ArrayList list = Properties.Settings.Default.test;
for (int iDate = 0; iDate < list.Count; iDate++)
{
   DateTime dateValue = (DateTime)list[iDate];
}

Tenha um olhar em Usando configurações em C #

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top