void guardar_general() { datos_en__conjunto conjuntotempo = new datos_en__conjunto(); conjuntotempo.Numero_de_casa = Convert.ToInt32(textBox1.Text); conjuntotempo.Dpi = Convert.ToInt32(textBox2.Text); conjuntotempo.Nombre = textBox3.Text; conjuntotempo.Apellido = textBox4.Text; conjuntotempo.Cuota_mantenimiento = double.Parse(textBox5.Text); conjuntotempo.Cantidad_casas = 1; ultimo.Add(conjuntotempo); }
void lectura_general() { FileStream leer_ = new FileStream("Datos_en_Conjunto.txt", FileMode.Open, FileAccess.Read); StreamReader kleer = new StreamReader(leer_); while (kleer.Peek() > -1) { datos_en__conjunto datos_ = new datos_en__conjunto(); datos_.Numero_de_casa = Convert.ToInt32(kleer.ReadLine()); datos_.Dpi = Convert.ToInt32(kleer.ReadLine()); datos_.Nombre = kleer.ReadLine(); datos_.Apellido = kleer.ReadLine(); datos_.Cuota_mantenimiento = double.Parse(kleer.ReadLine()); datos_.Cantidad_casas = Convert.ToInt32(kleer.ReadLine()); ultimo.Add(datos_); } kleer.Close(); }