Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
Singly LinkedList Traversal using C#
Declare a LinkedList using the LinkedList collection in X# −
var a = new LinkedList < string > ();
Now add elements to the LinkedList −
a.AddLast("Tim");
a.AddLast("Tom");
Let us see how to perform traversal in a LinkedList −
Example
using System;
using System.Collections.Generic;
public class Demo {
public static void Main(string[] args) {
var a = new LinkedList < string > ();
a.AddLast("Tim");
a.AddLast("Tom");
foreach(var res in a) {
Console.WriteLine(res);
}
}
} Advertisements
