Why the code give me an error

Apr 13 2014 5:38 PM
Hi there 
I have this code 
public class NodeList<T> : Collection<Node<T>>
{
public NodeList() : base() { }
public NodeList(int initialSize)
{ // Add the specified number of items
for (int i = 0; i < initialSize; i++)
base.Items.Add(default(Node<T>));
}
public Node<T> FindByValue(T value)
{ // search the list for the value
foreach (Node<T> node in Items)
if (node.Value.Equals(value)) return node;
// if we reached here, we didn't find a matching node
return null;
}
}
source : http://msdn.microsoft.com/en-US/library/ms379572(v=vs.80).aspx
i
n visual studio 2010 c# language it gives me an error in
public class NodeList<T> : Collection<Node<T>>
so I change it to ICollection
and then the error jump to base.items , exactly with items
so what is wrong ... it is from msdn.microsoft

Answers (3)