I need a circular linked list, so I am wondering if LinkedList
is a circular linked list?
views:
803answers:
3First yes, now no.... you are confusing doubly linked with circular.
leppie
2009-06-22 16:49:30
Yes! Sorry. Fixed now.
Lucas Jones
2009-06-22 16:49:58
+5
A:
No. It is a doubly linked list, but not a circular linked list. See MSDN for details on this.
LinkedList<T> makes a good foundation for your own circular linked list, however. But it does have a definite First and Last property, and will not enumerate around these, which a proper circular linked list will.
Reed Copsey
2009-06-22 16:49:13
+4
A:
If you need a circular data structure, have a look at the C5 generic collections library. They have any collection that's imaginably useful in there, including a circular queue (which might help you).
Jacob
2009-06-22 16:53:50