Question, chapter 5, page 110, Creating Generic Classes, the first code demonstrating non-generic class. In stepping through the code I understand creating the first LinkedListNode, and why First and Last point to the newNode.
In subsequent iterations when the line executes:
Last.Next = newNode;
both First.Next and Last.Next are updated to point to newNode. Then on the next two lines:
Last = newNode;
Last.Prev = previous;
when Last.Prev is updated, First.Prev is not updated. I'm not sure why this happens. Can anybody answer this?
I know during the first iteration that First and Last point to newNode. I'm assuming this has something to due with references. Not sure why Last = newNode, this breaks that reference and Last can be updated without affecting First.