text: public static ValueEval GetSingleValue(ValueEval arg, int srcCellRow, int srcCellCol){ValueEval result;if (arg is RefEval){result = ChooseSingleElementFromRef((RefEval)arg);}else if (arg is AreaEval){result = ChooseSingleElementFromArea((AreaEval)arg, srcCellRow, srcCellCol);}else{result = arg;}if (result is ErrorEval){throw new EvaluationException((ErrorEval)result);}return result;}