Foxhole Atheist
Tuesday, August 6, 2013
Using a for loop on a linked list
LinkedList
<
int
> ll =
new
LinkedList
<
int
>(
new
int
[] {2, 5, 8, 2, 3, 6 });
for
(
LinkedListNode
<
int
> node = ll.First; node !=
null
; node = node.Next)
{
Console
.WriteLine(node.Value);
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment