void IList <double> .RemoveAt(int index) { if ((index < 0) || (index >= data.Count)) { throw new ArgumentOutOfRangeException("index"); } data.RemoveAt(index); }
/// <summary> /// Removes a data point from the sample. /// </summary> /// <param name="x">The x-value of the data point.</param> /// <param name="y">The y-value of the data point.</param> /// <returns>True if the given data point was found and removed, otherwise false.</returns> public bool Remove(double x, double y) { if (isReadOnly) { throw new InvalidOperationException(); } else { int index = IndexOf(x, y); if (index < 0) { return(false); } else { xData.RemoveAt(index); yData.RemoveAt(index); return(true); } } }