text: public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0){double result;if (arg0 is RefEval){result = CountUtils.CountMatchingCellsInRef((RefEval)arg0, predicate);}else if (arg0 is ThreeDEval){result = CountUtils.CountMatchingCellsInArea((ThreeDEval)arg0, predicate);}else{throw new ArgumentException("Bad range arg type (" + arg0.GetType().Name + ")");}return new NumberEval(result);}