Carga de un DateTime matriz en ListBox?
-
13-09-2019 - |
Pregunta
¿Cómo puedo guardar una de las Propiedades.Los ajustes.Por defecto.Matriz de uso de formato DateTime (con el tiempo)?
Solución
OK, he encontrado este
Añadir un valor, tipo, seleccione buscar y encontrar el Sistema.De la colección.ArrayList.
para guardar los 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 los valores
System.Collections.ArrayList list = Properties.Settings.Default.test;
for (int iDate = 0; iDate < list.Count; iDate++)
{
DateTime dateValue = (DateTime)list[iDate];
}
Eche un vistazo a Con la Configuración en C#
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow