P
Paul
Hi all,
I'm trying to implement IList and keep getting an error when trying to
implement GetEnumerator().
My class has a List<String> and I've been using its methods as return
types for IList, but I can't seem to figure the the get enumerator
section. I try:
//IEnumerable
public IEnumerator GetEnumerator()
{
return list.GetEnumerator();
}
but keep getting the error:
Error 1 'Foo' does not implement interface member
'System.Collections.Generic.IEnumerable<string>.GetEnumerator()'.
Foo.GetEnumerator()' is either static, not public, or has the wrong
return type.
Any help would be appreciated.
Thanks,
Paul
I'm trying to implement IList and keep getting an error when trying to
implement GetEnumerator().
My class has a List<String> and I've been using its methods as return
types for IList, but I can't seem to figure the the get enumerator
section. I try:
//IEnumerable
public IEnumerator GetEnumerator()
{
return list.GetEnumerator();
}
but keep getting the error:
Error 1 'Foo' does not implement interface member
'System.Collections.Generic.IEnumerable<string>.GetEnumerator()'.
Foo.GetEnumerator()' is either static, not public, or has the wrong
return type.
Any help would be appreciated.
Thanks,
Paul