How to find specific node in LinkedList with C#

1 Answer

0 votes
using System;
using System.Collections.Generic;
                       
public class Program
{
    public static void Main()
    {
        string[] arr =  { "python", "c#", "php", "nodejs", "java", "c", "c++" };
           
        LinkedList<string> ll = new LinkedList<string>(arr);
         
        LinkedListNode<string> current = ll.Find("php");
           
        Console.WriteLine(current.Value);
        Console.WriteLine(current.Next.Value);
    }
}
   
 
 
/*
run:
 
php
nodejs
 
*/

 



answered May 7, 2020 by avibootz

Related questions

1 answer 164 views
1 answer 169 views
1 answer 173 views
1 answer 148 views
1 answer 163 views
...