YIELD Statement | Iterator Methods | Exploring C# and DOTNET | Rahul Nath
In .NET, Iterators provide a way to create an Enumerable. While you can implement the IEnumerable interface, iterators make it much easier with the yield statement. In this video, we will learn how to use the `yield` statement to create an enumerable, how it works, and how it supports lazy evaluation. We will learn about yield return and yield break statements. We will also see a real-world use case for searching through a large log file stored in cloud storage (AWS S3) without downloading the entire file into memory. This video is sponsored by AWS. 00:00 Introduction 01:24 yield statement 03:12 Compiler Generated Code 04:23 yield break 05:57 Lazy evaluation 08:10 Infite Enumerable 10:40 Searching File in AWS S3 Additional Watching: 📹C# Series - https://bit.ly/mycsharp 📹ASP NET Core Series -https://bit.ly/asp-net-core-series 📹AWS S3 - https://youtu.be/3sdTztvaxhg 📹Async Enumerable - https://youtu.be/u7Q2zlM1QHg 📹AWS Series https://bit.ly/aws-net-series Come say hi! ✋ 🎙️Uses - https://www.rahulpnath.com/uses 🌍Blog - https://www.rahulpnath.com/ ✉ Subscribe to my Newsletter - https://www.rahulpnath.com/subscribe 🐦Twitter - https://twitter.com/rahulpnath 📸Instagram - https://www.instagram.com/rahulpnath/ #dotnet #csharp
Download
0 formatsNo download links available.