internal void AdjustUpdateLogToDelete(int index) { UpdateLogEntry removeThis = null; foreach (var logEntry in UpdateLog) { if (logEntry.Index == index) { removeThis = logEntry; } else if (logEntry.Index > index) { logEntry.Index--; } } if (removeThis != null) { UpdateLog.Remove(removeThis); } }