C# LinkedList RemoveFirst

Description

LinkedList RemoveFirst removes the node at the start of the LinkedList .

Syntax

LinkedList.RemoveFirst has the following syntax.


public void RemoveFirst()

Example


using System;//  w  w  w .  ja  va 2  s . com
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.RemoveFirst();
      
   }
}




















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




HashSet
LinkedList
LinkedListNode
List
Queue
SortedSet
Stack