In picture :

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 ?
You’re looking at the wrong
AsEnumerablemethod – you’re callingDataTableExtensions.AsEnumerable. rather thanEnumerable.AsEnumerable.