 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
C# Program to create a LinkedList
Firstly, set a string array.
string [] students = {"Tim","Jack","Henry","David","Tom"}; Now, add it to the LinkedList.
LinkedList<string> list = new LinkedList<string>(students);
The above creates a LinkedList and adds node to it.
Let us see the complete example.
Example
using System; using System.Collections.Generic; class Demo {    static void Main() {       string [] students = {"Tim","Jack","Henry","David","Tom"};       LinkedList<string> list = new LinkedList<string>(students);       foreach (var stu in list) {          Console.WriteLine(stu);       }    } }  Output
Tim Jack Henry David Tom
Advertisements
 