Пример #1
0
 // TODO: If desired, change parameters to Find method to search based on a property of DataPoint.
 public DataPoint Find(DataPoint dataPoint)
 {
     foreach(DataPoint dataPointItem in this)
         if (dataPointItem == dataPoint)    // Found it
             return dataPointItem;
     return null;    // Not found
 }
Пример #2
0
 public void Insert(int index, DataPoint dataPoint)
 {
     List.Insert(index, dataPoint);
 }
Пример #3
0
 public int IndexOf(DataPoint dataPoint)
 {
     for(int i = 0; i < List.Count; i++)
         if (this[i] == dataPoint)    // Found it
             return i;
     return -1;
 }
Пример #4
0
 // TODO: If you changed the parameters to Find (above), change them here as well.
 public bool Contains(DataPoint dataPoint)
 {
     return (Find(dataPoint) != null);
 }
Пример #5
0
 public int Add(DataPoint dataPoint)
 {
     return List.Add(dataPoint);
 }
Пример #6
0
 public void Remove(DataPoint dataPoint)
 {
     List.Remove(dataPoint);
 }