- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
Step 4: Iterators and IEnumerable in C#
Presented by: Serajoddin Aliabadi
In this video, we dive deep into how `IEnumerable` and iterators actually work in C#, going way beyond just “you can use it in a `foreach`”.
Using VS Code and SharpLab, I’ll show you:
- How to create iterator methods with `IEnumerableT` and `yield return`
- What really happens behind the scenes when you iterate over a collection
- How the C# compiler generates a state machine for your iterator methods
- What an enumerator does (`GetEnumerator`, `MoveNext`, `Current`) and how it all fits together
We’ll start from a simple example and gradually peel back the layers using SharpLab to inspect the generated code. By the end, you’ll not only know how to write iterator methods, but you’ll also understand what the compiler is doing for you under the hood.
If you’ve ever wondered:
- “What magic lets `foreach` work?”
- “What does `yield return` actually do?”
- “What is this ‘state machine’ people talk about in C#?”
…this video is for you.
---
🔧 Tools used in this video:
- VS Code
- SharpLab
#csharp #dotnet #IEnumerable #yieldreturn #iterators #SharpLab #vscode #csharpinternals
Видео Step 4: Iterators and IEnumerable in C# канала CS Internship
In this video, we dive deep into how `IEnumerable` and iterators actually work in C#, going way beyond just “you can use it in a `foreach`”.
Using VS Code and SharpLab, I’ll show you:
- How to create iterator methods with `IEnumerableT` and `yield return`
- What really happens behind the scenes when you iterate over a collection
- How the C# compiler generates a state machine for your iterator methods
- What an enumerator does (`GetEnumerator`, `MoveNext`, `Current`) and how it all fits together
We’ll start from a simple example and gradually peel back the layers using SharpLab to inspect the generated code. By the end, you’ll not only know how to write iterator methods, but you’ll also understand what the compiler is doing for you under the hood.
If you’ve ever wondered:
- “What magic lets `foreach` work?”
- “What does `yield return` actually do?”
- “What is this ‘state machine’ people talk about in C#?”
…this video is for you.
---
🔧 Tools used in this video:
- VS Code
- SharpLab
#csharp #dotnet #IEnumerable #yieldreturn #iterators #SharpLab #vscode #csharpinternals
Видео Step 4: Iterators and IEnumerable in C# канала CS Internship
Комментарии отсутствуют
Информация о видео
17 ноября 2025 г. 2:10:30
00:20:35
Другие видео канала




















