private IObject DoOperand(IObject leftSide, char operand, IObject rightSide) { if (operand == '+') { return(leftSide.PlusOperator(rightSide)); } else if (operand == '-') { return(leftSide.MinusOperator(rightSide)); } else if (operand == '*') { return(leftSide.MultiplierOperator(rightSide)); } else if (operand == '/') { return(leftSide.DividerOperator(rightSide)); } else if (operand == '^') { return(leftSide.PowerOperator(rightSide)); } else { return(new IObject()); } }
private IObject DoOperand(IObject leftSide, string operand, IObject rightSide) { if (operand == "+") { return(leftSide.PlusOperator(rightSide)); } else if (operand == "-") { return(leftSide.MinusOperator(rightSide)); } else if (operand == "*") { return(leftSide.MultiplierOperator(rightSide)); } else if (operand == "/") { return(leftSide.DividerOperator(rightSide)); } else if (operand == "^") { return(leftSide.PowerOperator(rightSide)); } else { return(new IObject()); } }
private IObject DoOperand(IObject leftSide, char operand, IObject rightSide) { if (operand == '+') return leftSide.PlusOperator(rightSide); else if (operand == '-') return leftSide.MinusOperator(rightSide); else if (operand == '*') return leftSide.MultiplierOperator(rightSide); else if (operand == '/') return leftSide.DividerOperator(rightSide); else if (operand == '^') return leftSide.PowerOperator(rightSide); else return new IObject(); }
private IObject DoOperand(IObject leftSide, string operand, IObject rightSide) { if (operand == "+") return leftSide.PlusOperator(rightSide); else if (operand == "-") return leftSide.MinusOperator(rightSide); else if (operand == "*") return leftSide.MultiplierOperator(rightSide); else if (operand == "/") return leftSide.DividerOperator(rightSide); else if (operand == "^") return leftSide.PowerOperator(rightSide); else return new IObject(); }