-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
47 lines (38 loc) · 1.23 KB
/
Copy pathProgram.cs
File metadata and controls
47 lines (38 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using DaLinkedList;
using System.Collections.Generic;
namespace Slorf
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
DaLinkedList.LinkedList<string> linkedList = new DaLinkedList.LinkedList<string>();
string hamster = Console.ReadLine();
linkedList.Add(hamster);
linkedList.Add("Blargh");
linkedList.Add("Sleff");
/*
IEnumerator<string> slorf = linkedList.GetEnumerator();
if (slorf.MoveNext())
{
string smet = slorf.Current;
slorf.Reset();
// null, since we reset. Must call MoveNext() again.
smet = slorf.Current;
}
*/
foreach (string tomte in linkedList)
{
Console.WriteLine(tomte);
}
string kneg = linkedList.Find("Blargh");
kneg = linkedList.Find(hamster);
kneg = linkedList.Find("Sleff");
bool res = linkedList.Remove("Blargh");
res = linkedList.Remove(hamster);
res = linkedList.Remove("Sleff");
}
}
}