New to Telerik UI for WinForms? Start a free 30-day trial

Stores values in a doubly linked sequence and exposes operations that insert, remove, and move node ranges. Several members of the standard collection interfaces are not implemented.

Definition

Namespace:Telerik.WinForms.Documents.DocumentStructure

Assembly:Telerik.WinControls.RichTextEditor.dll

Type Parameters:

T

The type of value stored in each node.

Syntax:

C#
public class RadLinkedList<T> : ICollection, IEnumerable

Inheritance: objectRadLinkedList<T>

Implements: ICollectionIEnumerable

Constructors

Initializes an empty linked list.

C#
public RadLinkedList()

Properties

Gets the number of values in the list. This operation is not implemented.

C#
public int Count { get; }
Exceptions: NotImplementedException

Counting list values is not implemented.

Gets the first node in the list.

C#
public RadLinkedListNode<T> First { get; }

Gets whether the list contains no nodes.

C#
public bool IsEmpty { get; }

Gets whether the list is read-only.

C#
public bool IsReadOnly { get; }

Gets the last node in the list.

C#
public RadLinkedListNode<T> Last { get; }

Methods

Appends the item as a new last node.

C#
public void Add(T item)
Parameters:itemT

The value to append.

Inserts an existing node immediately after another node in the list.

C#
public RadLinkedListNode<T> AddAfter(RadLinkedListNode<T> node, RadLinkedListNode<T> newNode)
Parameters:nodeRadLinkedListNode<T>

The existing node that precedes the inserted node.

newNodeRadLinkedListNode<T>

The node to insert.

Returns:

RadLinkedListNode<T>

The inserted node.

Creates a node for value and inserts it immediately after node.

C#
public RadLinkedListNode<T> AddAfter(RadLinkedListNode<T> node, T value)
Parameters:nodeRadLinkedListNode<T>

The existing node that precedes the inserted node.

valueT

The value stored in the inserted node.

Returns:

RadLinkedListNode<T>

The newly inserted node.

Inserts an existing node immediately before another node in the list.

C#
public RadLinkedListNode<T> AddBefore(RadLinkedListNode<T> node, RadLinkedListNode<T> newNode)
Parameters:nodeRadLinkedListNode<T>

The existing node that follows the inserted node.

newNodeRadLinkedListNode<T>

The node to insert.

Returns:

RadLinkedListNode<T>

The inserted node.

Creates a node for value and inserts it immediately before node.

C#
public RadLinkedListNode<T> AddBefore(RadLinkedListNode<T> node, T value)
Parameters:nodeRadLinkedListNode<T>

The existing node that follows the inserted node.

valueT

The value stored in the inserted node.

Returns:

RadLinkedListNode<T>

The newly inserted node.

Inserts an existing node at the beginning of the list.

C#
public RadLinkedListNode<T> AddFirst(RadLinkedListNode<T> node)
Parameters:nodeRadLinkedListNode<T>

The node to insert.

Returns:

RadLinkedListNode<T>

The inserted node.

Exceptions: ArgumentNullException

node is null.

Creates a node for value and inserts it at the beginning of the list.

C#
public RadLinkedListNode<T> AddFirst(T value)
Parameters:valueT

The value stored in the new first node.

Returns:

RadLinkedListNode<T>

The inserted node.

Appends an existing node to the end of the list.

C#
public RadLinkedListNode<T> AddLast(RadLinkedListNode<T> node)
Parameters:nodeRadLinkedListNode<T>

The node to append.

Returns:

RadLinkedListNode<T>

The appended node.

Exceptions: ArgumentNullException

node is null.

Creates a node for value and appends it to the list.

C#
public RadLinkedListNode<T> AddLast(T value)
Parameters:valueT

The value stored in the new last node.

Returns:

RadLinkedListNode<T>

The inserted node.

Inserts a contiguous node range immediately after the specified node.

C#
public void AddRangeAfter(RadLinkedListNode<T> node, RadLinkedListNode<T> rangeStartNode, RadLinkedListNode<T> rangeEndNode)
Parameters:nodeRadLinkedListNode<T>

The node that precedes the inserted range.

rangeStartNodeRadLinkedListNode<T>

The first node in the range.

rangeEndNodeRadLinkedListNode<T>

The last node in the range.

Inserts a contiguous node range immediately before the specified node.

C#
public void AddRangeBefore(RadLinkedListNode<T> node, RadLinkedListNode<T> rangeStartNode, RadLinkedListNode<T> rangeEndNode)
Parameters:nodeRadLinkedListNode<T>

The node that follows the inserted range.

rangeStartNodeRadLinkedListNode<T>

The first node in the range.

rangeEndNodeRadLinkedListNode<T>

The last node in the range.

Removes all values by resetting the list's first and last node references. Existing nodes are not individually invalidated.

C#
public void Clear()

Checks whether the list contains the specified value. This operation is not implemented.

C#
public bool Contains(T item)
Parameters:itemT

The value to locate.

Returns:

bool

Exceptions: NotImplementedException

Containment checks are not implemented.

Copies the list's values to an array. This operation is not implemented.

C#
public void CopyTo(T[] array, int arrayIndex)
Parameters:arrayT[]

The destination array.

arrayIndexint

The zero-based destination index at which copying begins.

Exceptions: NotImplementedException

Copying to an array is not implemented.

Gets an enumerator that visits the list's values in node order.

C#
public IEnumerator<T> GetEnumerator()
Returns:

IEnumerator<T>

An enumerator for the list.

Moves a contiguous range from another list to the end of this list.

C#
public void MoveNodes(RadLinkedList<T> fromList, RadLinkedListNode<T> fromNode, RadLinkedListNode<T> toNode)
Parameters:fromListRadLinkedList<T>

The list from which nodes are removed.

fromNodeRadLinkedListNode<T>

The first node in the range to move.

toNodeRadLinkedListNode<T>

The last node in the range to move.

Exceptions: ArgumentNullException

fromNode or toNode is null.

Moves the range from fromNode through the source list's last node to the end of this list.

C#
public void MoveNodes(RadLinkedList<T> fromList, RadLinkedListNode<T> fromNode)
Parameters:fromListRadLinkedList<T>

The list from which nodes are removed.

fromNodeRadLinkedListNode<T>

The first node in the range to move.

Removes a node from the list and clears its previous and next links.

C#
public void Remove(RadLinkedListNode<T> node)
Parameters:nodeRadLinkedListNode<T>

The node to remove.

Removes the specified value from the list. This operation is not implemented.

C#
public bool Remove(T item)
Parameters:itemT

The value to remove.

Returns:

bool

This method does not return because removal is not implemented.

Exceptions: NotImplementedException

Removing by value is not implemented.

Removes the first node from the list.

C#
public void RemoveFirst()
Exceptions: InvalidOperationException

The list is empty.

Removes the last node from the list.

C#
public void RemoveLast()
Exceptions: InvalidOperationException

The list is empty.

Removes a contiguous range of nodes from the list.

C#
public void RemoveRange(RadLinkedListNode<T> rangeHead, RadLinkedListNode<T> rangeTail)
Parameters:rangeHeadRadLinkedListNode<T>

The first node to remove.

rangeTailRadLinkedListNode<T>

The last node to remove.