public ListNode Search(ListNode node) { var tmp = Head; if (Count == 1) { if (tmp.Equals(node)) { return(node); } return(null); } while (tmp != null) { if (Equals(tmp, node)) { return(tmp); } tmp = tmp.Next; } return(null); }
public ListNode Search(string nodeValue) { var node = new ListNode(nodeValue); return(Search(node)); }