I have looked around and I can\'t really find an answer I can understand or it doesn\'t apply to me. I have this class:
class Node { public int value;
You iterate through your class as follows:
var currentNode = head; while ((currentNode != null) && (currentNode.Value != desiredValue)) currentNode = currentNode.next;
When the while loop completes, currentNode will be null or contain a node with the desired value.
while
null