About Me


Develop With Passion® - Developer Bootcamp


DNRTv Episode 3 - Correction

Written June 04, 2007 at 11:03 MDT Tagged screencasts

A lot of people have been quick to point out the fact that .Net 1.1 does not have generics, even though I forgot to mention that fact also. In response to this, here is how you can implement the ListEnumerable in a pre 2.0 environment:

public class ListEnumerable : IEnumerable
    private IList itemsToEnumerate;

    public ListEnumerable(IList itemsToEnumerate)
        this.itemsToEnumerate = itemsToEnumerate;

    public IEnumerator GetEnumerator()
        return itemsToEnumerate.GetEnumerator();

I hope that clears that up!!