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