G
Guest
I'm trying to implement a custom collection, but I'm having trouble trying to
duplicate some of the "features" found in the generic collections.
Specifically, implementing both the IEnumrable interface as well as the
IEnumerable<T> interface. When I click on "Goto Definition" of List<T> it
shows that List<T> implements both interfaces, but HOW?
IEnumerable<T> specifies a method like:
T GetEnumerator();
IEnumerable specifies a method like:
Object GetEnumerator();
You can't implement both because the signatures only differ by return type.
What trick am I missing?
duplicate some of the "features" found in the generic collections.
Specifically, implementing both the IEnumrable interface as well as the
IEnumerable<T> interface. When I click on "Goto Definition" of List<T> it
shows that List<T> implements both interfaces, but HOW?
IEnumerable<T> specifies a method like:
T GetEnumerator();
IEnumerable specifies a method like:
Object GetEnumerator();
You can't implement both because the signatures only differ by return type.
What trick am I missing?