LinkList<T> Class

General purpose linked list class.
Public Class LinkList(Of  _ 
T
Implements IEnumerable
This language is not supported or no code example is available.
public class LinkList<T> : IEnumerable
This language is not supported or no code example is available.
generic<typename T> 
public ref class LinkList : public IEnumerable^
This language is not supported or no code example is available.
JScript does not support generic types and methods.
This language is not supported or no code example is available.

Type Parameters

T

Name Description
Public constructor LinkList() Creates a new, empty linked list.
Top
Name Description
Public property Count Returns the number of elements in the list.
Public property First Gets a reference to the first node in the list.
Public property Last Gets a reference to the last node in the list.
Public property Modified
Top
Methods
 
Name Description
Public method AddFirst(T) Adds an object first in the linked list.
Public method AddLast(T) Adds an object last in the linked list.
Public method Clear() Empties the linked list.
Public method CutNode(LinkListNode<T>) Removes a node from the list, keeping it's position pointers. It is then possible to re-insert it with PasteNode(), but use with care because the previous and next node of this one still has to exist!
Public method Erase(LinkListNode<T>) Removes a node from the linked list and returns the new node that is in the same position as the one removed.
Public method EraseFirst() Removes the first node/object from the list. If the list is empty, an exception will be thrown.
Public method EraseLast() Removes the last node/object from the list. If the list is empty, an exception will be thrown.
Public method Find(T) Searches the list for a node containing obj using ==.
Public method GetEnumerator() Returns an iterator that iterates through this LinkList.
Public method Insert(LinkListNode<T>, T) Inserts an object before the another node. The newly created node is returned. If the 'before object' is null, the data object is added last in the list.
Public method PasteNode(LinkListNode<T>) Re-inserts a node previously removed with CutNode(...)
Public method Reverse() Reverses the list in-place.
Public method Sort() Sorts the list using the IComparable interface of the objects.
Public method Sort(Comparison<T>) Sort the list unsing a comparison function.
Public method ToList() Create a List out of this LinkList. Note: only references are added to the list, if T is a reference type! That is, no copies are made!
Top
IGS.Genamo.LinkList<T>

.NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8

In this article

Definition