//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private org.boris.expr.ExprArray addColumnToArray(org.boris.expr.ExprArray paramExprArray1, org.boris.expr.ExprArray paramExprArray2) throws org.boris.expr.ExprException
        private ExprArray addColumnToArray(ExprArray paramExprArray1, ExprArray paramExprArray2)
        {
            int       i         = paramExprArray1.rows();
            int       j         = paramExprArray1.columns() + paramExprArray2.columns();
            ExprArray exprArray = new ExprArray(i, j);

            for (sbyte b = 0; b < i; b++)
            {
                for (int k = 0; k < j; k++)
                {
                    ExprInteger exprInteger = null;
                    if (k < paramExprArray1.columns())
                    {
                        exprInteger = paramExprArray1.get(b, k);
                    }
                    else
                    {
                        int m = k - paramExprArray1.columns();
                        if (b < paramExprArray2.rows() && m < paramExprArray2.columns())
                        {
                            exprInteger = paramExprArray2.get(b, m);
                        }
                        else
                        {
                            exprInteger = new ExprInteger(0);
                        }
                    }
                    exprArray.set(b, k, exprInteger);
                }
            }
            return(exprArray);
        }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public org.boris.expr.Expr evaluate(org.boris.expr.IEvaluationContext paramIEvaluationContext, org.boris.expr.Expr[] paramArrayOfExpr) throws org.boris.expr.ExprException
        public virtual Expr evaluate(IEvaluationContext paramIEvaluationContext, Expr[] paramArrayOfExpr)
        {
            assertArgCount(paramArrayOfExpr, 1);
            ExprArray exprArray = asArray(paramIEvaluationContext, paramArrayOfExpr[0], true);

            return(new ExprInteger(exprArray.columns()));
        }
        private ExprArray calcArrays(ExprArray paramExprArray1, ExprArray paramExprArray2)
        {
            int       i         = paramExprArray1.rows();
            int       j         = paramExprArray1.columns();
            int       k         = paramExprArray2.rows();
            int       m         = paramExprArray2.columns();
            ExprArray exprArray = new ExprArray(i, j);

            for (sbyte b = 0; b < i; b++)
            {
                for (sbyte b1 = 0; b1 < j; b1++)
                {
                    Expr expr = paramExprArray1.get(b, b1);
                    if (!expr.evaluatable && expr is ExprNumber && b < k && b1 < m)
                    {
                        Expr expr1 = paramExprArray2.get(b, b1);
                        if (!expr1.evaluatable && expr1 is ExprNumber)
                        {
                            ExprNumber exprNumber1 = (ExprNumber)expr;
                            ExprNumber exprNumber2 = (ExprNumber)expr1;
                            if (exprNumber2.doubleValue() == 0.0D)
                            {
                                exprArray.set(b, b1, new ExprDouble(0.0D));
                            }
                            else if (exprNumber1 is ExprDouble)
                            {
                                exprArray.set(b, b1, new ExprDouble(exprNumber1.doubleValue() / exprNumber2.doubleValue()));
                            }
                            else
                            {
                                exprArray.set(b, b1, new ExprInteger(exprNumber1.intValue() / exprNumber2.intValue()));
                            }
                        }
                    }
                    else
                    {
                        exprArray.set(b, b1, expr);
                    }
                }
            }
            return(exprArray);
        }