java: public void construct(CellValueRecordInterface rec, RecordStream rs, SharedValueManager sfh) {if (rec instanceof FormulaRecord) {FormulaRecord formulaRec = (FormulaRecord)rec;StringRecord cachedText;Class<? extends Record> nextClass = rs.peekNextClass();if (nextClass == StringRecord.class) {cachedText = (StringRecord) rs.getNext();} else {cachedText = null;}insertCell(new FormulaRecordAggregate(formulaRec, cachedText, sfh));} else {insertCell(rec);}}
C#: public void Construct(CellValueRecordInterface rec, RecordStream rs, SharedValueManager sfh){if (rec is FormulaRecord){FormulaRecord formulaRec = (FormulaRecord)rec;StringRecord cachedText=null;Type nextClass = rs.PeekNextClass();if (nextClass == typeof(StringRecord)){cachedText = (StringRecord)rs.GetNext();}else{cachedText = null;}InsertCell(new FormulaRecordAggregate(formulaRec, cachedText, sfh));}else{InsertCell(rec);}}