C# LinkedList AddLast(LinkedListNode)

Description

LinkedList AddLast(LinkedListNode ) adds the specified new node at the end of the LinkedList .

Syntax

LinkedList.AddLast(LinkedListNode) has the following syntax.


public void AddLast(
  LinkedListNode<T> node
)

Parameters

LinkedList.AddLast(LinkedListNode) has the following parameters.

  • node - The new LinkedListNode to add at the end of the LinkedList .

Example


/*from   w  w w .  j  a v  a  2s.c  o  m*/
using System;
using System.Collections;
using System.Collections.Generic;

public class GenericCollection  
{
   public static void Main()  
   {
      LinkedList<String> ll = new LinkedList<String>();
      ll.AddLast( "A" );
      ll.AddLast( "B" );
      ll.AddLast( "C" );
      ll.AddLast( "java2s.com" );

      ll.AddLast(ll.First );

   }
}




















Home »
  C# Tutorial »
    System.Collections.Generic »




HashSet
LinkedList
LinkedListNode
List
Queue
SortedSet
Stack