How to get the first node from LinkedList in 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" };
         
        LinkedList<string> ll = new LinkedList<string>(arr);
		
		Console.WriteLine(ll.First.Value);
    }
}
 
 
 
/*
run:
 
python
 
*/

 



answered May 7, 2020 by avibootz

Related questions

1 answer 162 views
1 answer 163 views
1 answer 164 views
1 answer 169 views
1 answer 173 views
1 answer 153 views
...