//______________________________________________________________________________________________________________________________________________________//
        /// <summary>
        /// Metodo recursivo para regresar todos los productos de forma invertida.
        /// </summary>
        /// <param name="principal"></param>
        /// <returns></returns>
        private string reporteDeProductosRecursividad(Producto principal)
        {
            string cadena1 = "";

            if (principal.siguiente != null)
            {
                cadena1 = reporteDeProductosRecursividad(principal.siguiente);
            }
            cadena1 += principal.ToString();
            return(cadena1);
        }
        public string Reporte()
        {
            String datos = "";

            temp = inicio;
            while (temp != null)
            {
                datos += temp.ToString() + Environment.NewLine;
                temp   = temp.siguiente;
            }
            return(datos);
        }
Ejemplo n.º 3
0
        public override string ToString()
        {
            string   mostrar = "";
            Producto tmp     = inicio;

            while (tmp != null)
            {
                mostrar += tmp.ToString();
                tmp      = tmp.siguiente;
            }
            return(mostrar);
        }
Ejemplo n.º 4
0
        public string reporteInverso()
        {
            string   mostrar = " ";
            Producto tmp     = final;

            while (tmp != null)
            {
                mostrar += tmp.ToString();
                tmp      = tmp.anterior;
            }
            return(mostrar);
        }
        /// <summary>
        /// Muestra todos los productos en el vector.
        /// </summary>
        /// <returns></returns>
        public string reporteDeProductos()
        {
            string   cadena = "";
            Producto temp   = inicio;

            while (temp != null)
            {
                cadena += temp.ToString();
                temp    = temp.siguiente;
            }

            return(cadena);
        }
        public String reporteInverso()
        {
            String inf = " ";
            String apoy;

            temp = inicio;
            while (temp != null)
            {
                apoy = temp.ToString() + Environment.NewLine;
                inf  = apoy + inf;
                temp = temp.siguiente;
            }
            return(inf);
        }