Creating a circularly linked list in C#?

后端 未结 10 1210
独厮守ぢ
独厮守ぢ 2020-11-29 06:35

What would be the best way to create a circularly linked list in C#. Should I derive it from the LinkedList< T> collection? I\'m planning on creating a simple address boo

10条回答
  •  囚心锁ツ
    2020-11-29 06:59

    It would likely be a bad idea to derive from the BCL LinkedList class. That class is designed to be a non-circular list. Trying to make it circular will only cause you problems.

    You're probably much better off writing your own.

提交回复
热议问题