Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Datatable implements IEnumerable?

In picture :

enter image description here

How does AsEnumerable Methods Knows that the type should be DataRow ?

I've searched in Reflector and Datatable does Not implement IEnumerable..

And the AsEnumerable code is:

public static IEnumerable<TSource> AsEnumerable<TSource>(this IEnumerable<TSource> source)
{
    return source;
}

What am I missing ?

like image 696
Royi Namir Avatar asked Jan 09 '12 11:01

Royi Namir


1 Answers

You're looking at the wrong AsEnumerable method - you're calling DataTableExtensions.AsEnumerable. rather than Enumerable.AsEnumerable.

like image 140
Jon Skeet Avatar answered Oct 19 '22 23:10

Jon Skeet