C# LinkedList Find

Description

LinkedList Find finds the first node that contains the specified value.

Syntax

LinkedList.Find has the following syntax.


public LinkedListNode<T> Find(
  T value
)

Parameters

LinkedList.Find has the following parameters.

  • value - The value to locate in the LinkedList .

Example


using System;// ww w.  java  2s  .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" );
      
      LinkedListNode<String> t =  ll.Find("A");
      
   }
}




















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




HashSet
LinkedList
LinkedListNode
List
Queue
SortedSet
Stack