// TODO: If desired, change parameters to Find method to search based on a property of ObjectiveValues. public ObjectiveValues Find(ObjectiveValues objValue) { foreach (ObjectiveValues lDetailValue in this) if (lDetailValue == objValue) // Found it return lDetailValue; return null; // Not found }
public int IndexOf(ObjectiveValues objValue) { for (int i = 0; i < List.Count; i++) if (this[i] == objValue) // Found it return i; return -1; }
public void AddObjectiveToTrack(string name, float score) { //OBJECTIVESCORES.Add(name, 0);' ObjectiveValues val = new ObjectiveValues(name, 0, score); objectiveCollection.Add(val); }
// TODO: If desired, change parameters to Find method to search based on a property of ObjectiveValues. public ObjectiveValues Find(ObjectiveValues objValue) { foreach (ObjectiveValues lDetailValue in this) { if (lDetailValue == objValue) // Found it { return(lDetailValue); } } return(null); // Not found }
public int IndexOf(ObjectiveValues objValue) { for (int i = 0; i < List.Count; i++) { if (this[i] == objValue) // Found it { return(i); } } return(-1); }
public void Remove(ObjectiveValues objValue) { List.Remove(objValue); }
public void Insert(int index, ObjectiveValues objValue) { List.Insert(index, objValue); }
// TODO: If you changed the parameters to Find (above), change them here as well. public bool Contains(ObjectiveValues objValue) { return (Find(objValue) != null); }
public int Add(ObjectiveValues objValue) { return List.Add(objValue); }
// TODO: If you changed the parameters to Find (above), change them here as well. public bool Contains(ObjectiveValues objValue) { return(Find(objValue) != null); }
// public methods... #region Add public int Add(ObjectiveValues objValue) { return(List.Add(objValue)); }