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.GetEnumera tor();
}
but keep getting the error:
Error 1 'Foo' does not implement interface member
'System.Collect ions.Generic.IE numerable<strin g>.GetEnumerato r()'.
Foo.GetEnumerat or()' 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.GetEnumera tor();
}
but keep getting the error:
Error 1 'Foo' does not implement interface member
'System.Collect ions.Generic.IE numerable<strin g>.GetEnumerato r()'.
Foo.GetEnumerat or()' is either static, not public, or has the wrong
return type.
Any help would be appreciated.
Thanks,
Paul
Comment