C# Generics: Collection Interfaces
Subject:   VB
Date:   2006-03-22 17:13:53
From:   woaksie
I am trying to use IEnumerator<T> in VB 2005. My class implements the IEnumerable<T> interface and I define a method GetEnumerator that returns a IEnumerator<T>.

The compiler is asking me to define a GetEnumerator method (the non generic version). But you cannot have two methods that that only differ by return type.

I think this is because the IEnumerable<T> interface implements the IEnumerable interface.

Also my GetEnumerator<T> method does a return mList.GetEnumerator() where mList is of type List<T>. Is there a yield command in VB 2005?


1 to 2 of 2
  1. VB
    2008-01-18 06:06:22  integragreg [View]

  2. VB
    2006-03-23 04:24:31  JesseLiberty [View]

1 to 2 of 2