LinkedList<T> extension methods.
Namespace: Cadenza.Collections
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0
See Also: Inherited members from object.
⊟ Public Methods
staticNodeAt<T> (this LinkedList<T>, int) : LinkedListNode<T> Returns the LinkedListNode<T> at the specified index of the LinkedList<T>.
⊟ NodeAt<T> Generic Method
Returns the LinkedListNode<T> at the specified index of the LinkedList<T>.
⊟ Type Parameters
- T
- The type of the elements within self.
⊟ Parameters
- self
- A LinkedList<T> to get a LinkedListNode<T> from.
- index
- A int containing the zero-based index of the LinkedListNode<T> to retrieve.
⊟ Returns
The LinkedListNode<T> at the specified index of the LinkedList<T>.⊟ Exceptions
Type Reason ArgumentNullException self is null. ArgumentOutOfRangeException index is negative.
-or-
index is greater than or equal to LinkedList<T>.Count.
⊟ Remarks
C# Example LinkedList<int> list = new LinkedList<int>(); list.AddLast (1); // first node; index=0 list.AddLast (2); // middle node; index=1 list.AddLast (3); // last node; index=2 Assert.AreSame (list.First, list.NodeAt (0)); Assert.AreSame (list.First.Next, list.NodeAt (1)); Assert.AreSame (list.Last.Previous, list.NodeAt (1)); Assert.AreSame (list.Last, list.NodeAt (2)); Assert.AreEqual (3, list.NodeAt (2).Value);⊟ Requirements
Namespace: Cadenza.Collections
Assembly: Cadenza (in Cadenza.dll)
Assembly Versions: 0.1.0.0