private void compareData(string[] selectedFiles, DataReader dataReader, Dictionary <string, List <Object> > fileExtDataMap) { int firstRecord = 0; KeyValuePair <string, List <Object> > previous = new KeyValuePair <string, List <object> >(); foreach (KeyValuePair <string, List <Object> > entry in fileExtDataMap) { if (firstRecord == 0) { firstRecord++; //skip first file previous = entry; continue; } ComparisonReportGenerator comparison = new ComparisonReportGenerator(selectedFiles, "log.txt"); DataComparison dataComparison = new DataComparison(comparison); dataComparison.compareObj(previous.Value, entry.Value, previous.Key, entry.Key, DataInformation.getIfSpreadSheet()); previous = entry; firstRecord++; } }