Hacker News new | past | comments | ask | show | jobs | submit login

It's implicit based on the appropriate method overload being present. In fact that's the way foreach loops and LINQ already work in C#, you don't actually need to implement IEnumerable or IQueryable to use them.

https://blogs.msdn.microsoft.com/ericlippert/2011/06/30/foll...




Ah, that’s interesting. I always just assumed everything I was using inherited IEnumerable somewhere way down the line. Thought it’s possible that was the case too. It’s been a few years for me and I didn’t do much outside of standard library / entity framework.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: