C# LinkedList AddLast(T)

Description

LinkedList AddLast(T) adds a new node containing the specified value at the end of the LinkedList .

Syntax

LinkedList.AddLast(T) has the following syntax.


public LinkedListNode<T> AddLast(
  T value
)

Parameters

LinkedList.AddLast(T) has the following parameters.

  • value - The value to add at the end of the LinkedList .

Example


using System;/* w w  w  .j  ava2 s. c o m*/
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" );

   }
}




















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




HashSet
LinkedList
LinkedListNode
List
Queue
SortedSet
Stack