是LinkedList的.NET中循环链表?链表、LinkedList、NET

2023-09-03 06:29:42 作者:陈旧的沉默

我需要一个循环链表,所以我想知道如果的LinkedList 是一个循环链表?

I need a circular linked list, so I am wondering if LinkedList is a circular linked list?

推荐答案

没有。它是一个双向链表,但不是一个循环链表。请参见 MSDN查找有关此的细节。

No. It is a doubly linked list, but not a circular linked list. See MSDN for details on this.

LinkedList的< T>然而,让您自己的循环链表了良好的基础。但它确实有一定的第一和最后一个属性,并不会列举围绕这些,这一个适当的循环链表会。

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.