kuhaku kuhaku - 1 year ago 75
C# Question

Where is the implementation of IEnumerable of Collection<T>

Suppose I have a

and I'm using
that returns
, where can I find the implementation of
for this collection?

On MS site they just say:

Returns an enumerator that iterates through the Collection.

But where is the class that implements

Answer Source

Looking into the source we can see that GetEnumerator returns the GetEnumerator of its' items field which concrete type is List<T> (inside the ctor)

That GetEnumerator returns an instance of List<T>.Enumerator an internal nested class whose source is available here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download