I have a class that’s using the IDictionary Interface, and I’ve implemented all of its interface methods, except for GetEnumerator(), which seems to be quite puzzling to me.
Apparently, from Google searching, I’ve found that there’s two methods by which I have to implement the GetEnumerator method.
The first method is:
public IDictionaryEnumerator GetEnumerator()
and the second is:
IEnumerator System.Collections.IEnumerable.GetEnumerator()
The MSDN documentation doesn’t seem to be that helpful on how to implement either one, and I’m not quite sure how to do so.
Currently, I continually get compiler errors along the lines of:
Error CS0738:
does not implement interface member
`System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,GameDataItem>>.
GetEnumerator()’
I was wondering if anyone ever faced this issue, and what was the solution to such an issue?