C# LinkedList RemoveLast

Description

LinkedList RemoveLast removes the node at the end of the LinkedList .

Syntax

LinkedList.RemoveLast has the following syntax.


public void RemoveLast()

Returns

LinkedList.RemoveLast method returns

Example


//w  w  w . ja  v  a2s.co  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.RemoveLast();
      
   }
}




















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




HashSet
LinkedList
LinkedListNode
List
Queue
SortedSet
Stack