Hello. There are two methods, differing only in one line. I would very much like to combine them into one, but I just can’t figure out how to do it.
public long FindPosition(Predicate<T> match) { if(match == null) throw new ArgumentNullException("match"); long position = FirstItemPosition; while(position != End) { Item<T> item = GetItemAtPosition(position); if(match(item.Value)) return position; position = item.Next; } return position; } private long FindPosition(Predicate<Item<T>> match) { if(match == null) throw new ArgumentNullException("match"); long position = FirstItemPosition; while(position != End) { Item<T> item = GetItemAtPosition(position); if(match(item)) return position; position = item.Next; } return position; }