public void AddOrUpdate(string date, ExcelRow newRowData) { if (content.ContainsKey(date)) { ExcelRow oldRowData = content[date] as ExcelRow; newRowData.AddOther(oldRowData); content[date] = newRowData; } else { newRowData.appStart = DateTime.Now.GetTime(); content.Add(date, newRowData); } WriteContentToFile(); Save(); }