For Programmers: Free Programming Magazines  


Home > Archive > C# > October 2005 > Re: problem using IEnumerable<T>









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: problem using IEnumerable<T>
Jonathan Swartz

2005-10-13, 6:58 pm

The problem is that the IEnumerable<T> interface implements the
non-generic IEnumerable interface:

public interface IEnumerable<T> : IEnumerable

The IEnumerable interface has a single method, GetEnumerator, yet your
implementation is not of the correct signature for IEnumerable.

The correct signature should be something like the following:

IEnumerator IEnumerable.GetEnumerator()
{
// This is probably what you are looking for
return items.GetEnumerator();
}

Hope that helps. Good luck!

Jonathan

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com