public List <FiguraGeo> CrearLista() { lista = new List <FiguraGeo>(); AbrirConexion(); dbCmd1 = dbCon1.CreateCommand(); // La consulta de la tabla en la base de datos dbCmd1.CommandText = "select * from VOLFIGURAS order by Nivel"; reader1 = dbCmd1.ExecuteReader(); //Ejecuta la consulta while (reader1.Read()) { FiguraGeo r3 = new FiguraGeo { IdFigura = reader1.GetInt32(0), Figura = reader1.GetString(1), Marcador = reader1.GetString(2), Lado = reader1.GetFloat(3), Apotema = reader1.GetFloat(4), Altura = reader1.GetFloat(5), Area = reader1.GetFloat(6), Volumen = reader1.GetFloat(7), Nivel = reader1.GetInt32(8) }; lista.Add(r3); //lista.Add(r3); } reader1.Close(); reader1 = null; CerrarConexion(); string stri = ""; lista.ForEach(item => stri += item.Figura + ", "); Debug.Log(stri); return(lista); }
public void ListToRepeat(FiguraGeo fig) { pendientes.Add(fig); }