Exemplo n.º 1
0
        private void VerificarTiposCorrectos(int fila, string[] elemsFila)
        {
            int col = 0;

            foreach (string elemento in elemsFila)
            {
                Elem elem = new Elem(elemento);
                if (!elem.TipoCorrecto(Definicion.Tipo))
                {
                    throw new Exception(Mensajes.ElementoDeTipoIncorrectoEnLaMatriz(Definicion.Nombre, fila, col));
                }
                col++;
            }
        }
Exemplo n.º 2
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++;
            }
        }
Exemplo n.º 3
0
 private void VerificarTiposCorrectos( int fila, string[] elemsFila )
 {
     int col = 0;
     foreach( string elemento in elemsFila )
     {
         Elem elem = new Elem( elemento );
         if( !elem.TipoCorrecto( Definicion.Tipo ) )
             throw new Exception( Mensajes.ElementoDeTipoIncorrectoEnLaMatriz( Definicion.Nombre, fila, col ) );
         col++;
     }
 }
Exemplo n.º 4
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++;
            }
        }