public bool Contains(Object obj) { ClubMember cm = obj as ClubMember; Node temp = new Node(); temp = Head; while (temp.Next != null) { if (cm.Equals(temp.Data)) { return(true); } temp = temp.Next; } return(false); }
public int IndexOf(object obj) { ClubMember cm = obj as ClubMember; Node temp = new Node(); int counter = 0; temp = Head; while (temp.Next != null) { counter++; if (cm.Equals(temp.Data)) { return(counter); } temp = temp.Next; } return(-1); }