Whats LinkedListNode<>?

  • Thread starter Thread starter Marc Gravell
  • Start date Start date
M

Marc Gravell

The LinkedListNode<T> is indeed a wrapper aroundt the value (which in
the case of 54, is a value-type [not reference-type as stated]), but
it provides more: from a LinkedListNode<T> you can navigate through
the (doubly-linked) list via Previous, Next and List. The List
maintains these relationships itself, so you can't mess it up...

Marc
 
When I create a LinkedList<> what is a LinkedListNode compared to a value?

AddFirst(54) for example, does it turn 54 into a node or what? I'm trying ot
find out what the LinkedListNode is specifically for? Basically just a
wrapper around the reference type?
 
Marc Gravell said:
The LinkedListNode<T> is indeed a wrapper aroundt the value (which in
the case of 54, is a value-type [not reference-type as stated]), but
it provides more: from a LinkedListNode<T> you can navigate through
the (doubly-linked) list via Previous, Next and List. The List
maintains these relationships itself, so you can't mess it up...

Thanks. I figured it was that but just needed to make sure.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top