Compiler error: HashDictionary.cs, Chapter 18 Introduction to programming with c#
Hello
Please I need help compiling this code HashDictionary.cs in Chapter 18 of C# Programming. I keep getting compiler error in the last part of the code related to
IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<KeyValuePair<K, V>>)this).
GetEnumerator();
}
I am just trying to compile the code as it is in the textbook.
Error information:
Chapter18.cs(761,5): error CS0305: Using the generic type
'System.Collections.Generic.IEnumerator<T>' requires 1 type arguments
c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll: (Location of symbol
related to previous error)
The full code is as follows
http://pastebin.com/nRE8s6zw
ModEdit: Please dont post long parts of code directly to the forum.
Thanks. I had using System.Collections.Generic intially.
I thought that namespace was sufficient for the code. The error is cleared. Thanks once again