Exemplo n.º 1
0
        public void EstablecerValor(string[] fila)
        {
            EstablecerLongitud(fila.Length);
            int i = 0;

            foreach (string elemento in fila)
            {
                Elem elem = new Elem(elemento);
                if (!elem.TipoCorrecto(Definicion.Tipo))
                {
                    throw new Exception(Mensajes.ElementoDeTipoIncorrectoEnElVector(Definicion.Nombre, i));
                }
                Elementos[i] = elem;
                i++;
            }
        }