public void InsertRun(DataRun existingRun, DataRun newRun) { int idx = DataRuns.IndexOf(existingRun); if (idx < 0) { throw new ArgumentException("Attempt to replace non-existant run", nameof(existingRun)); } DataRuns.Insert(idx + 1, newRun); }
public void InsertRun(int index, DataRun newRun) { DataRuns.Insert(index, newRun); }