MENU

Fun & Interesting

C# IEnumerable & IEnumerator

Tarodev 36,614 3 years ago
Video Not Working? Fix It Now

IEnumerable and IEnumerator play an integral part in your day-to-day development, whether you know about them or not! They can also yield strange results if you don't know how they work. In this video I'll show you what they do, how they work and how you can create your own enumerable classes. This video is sponsored by Jet brains. Check out their amazing software suite here: https://jb.gg/vp1aem ❤️ Become a Tarobro on Patreon: https://www.patreon.com/tarodev ========= 🔔 SUBSCRIBE: https://bit.ly/3eqG1Z6 🗨️ DISCORD: https://discord.gg/tarodev ✅ MORE TUTORIALS: https://www.youtube.com/tarodev 00:00 - Intro 00:20 - First example (Heroes of Olympus) 4:00 - Second example (Query behaviour / Random) 6:16 - ToList() tradeoffs - pros & cons 8:03 - ToList() example 9:24 - Example benchmark 11:33 - IDE love 13:30 - One at a time 16:45 - Linq benefits on IEnumerables 18:00 - Custom IEnumerator 21:41 - Generic IEnumerator for Linq queries 23:56 - Summary

Comment