Ejemplo n.º 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
 }
Ejemplo n.º 2
0
 public void Insert(int index, DataPoint dataPoint)
 {
     List.Insert(index, dataPoint);
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 5
0
 public int Add(DataPoint dataPoint)
 {
     return List.Add(dataPoint);
 }
Ejemplo n.º 6
0
 public void Remove(DataPoint dataPoint)
 {
     List.Remove(dataPoint);
 }