public void RemovePoint(double time, double depth) { List <DivePoint> buffer = new List <DivePoint>(); foreach (DivePoint point in DivePoints) { buffer.Add(point); } DivePoints.Clear(); for (int i = 0; i < buffer.Count; i++) { if (!(buffer[i].Time == time && buffer[i].Depth == depth)) { DivePoints.Add(buffer[i]); } } }
public void RemovePoint(int listNumber) { List <DivePoint> buffer = new List <DivePoint>(); foreach (DivePoint point in DivePoints) { buffer.Add(point); } DivePoints.Clear(); for (int i = 0; i < buffer.Count; i++) { if (i != listNumber) { DivePoints.Add(buffer[i]); } } }