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;
I know this is an old post, but this is what is popping up on google, and I do have a good alternative to the current best answer (not including the desired value condition)
LinkedListNode list = new LinkedListNode();
for(LinkedListNode
This version obviously uses a for loop and moves the variable declaration and increment to one line allowing you to condense and beautify your code.