C# IEnumerable (Generator) Explained

preview_player
Показать описание
In this IEnumerable tutorial, I explain how IEnumerable works? how to use IEnumerable? as well as some things to watch out for. Remember IEnumerable is nothing more than a generator, and the object which contains the state of the generator get's spawned in place of the function returning the IEnumerable.

#csharp
Рекомендации по теме
Комментарии
Автор

Golden Youtuber. I only had to skip around in your videos to find what I needed - but damn. You go through everything so detailed. Big Thanks!

MperAule
Автор

Whole idea of LINQ Extensions methods works for classes which implements IEnumerable<T> interface, so it is interesting to see how actually that iteration inside it works. Nice video, keep up the good work!

AK-wegu
Автор

Great job. The reason for implementing two GetEnumerator() method one returning IEnumerator (prtty much IEnumerator <Object>) and another IEnumerator<T> is backward compatibility with Net 1.0 which did not support generics

vetald
Автор

Another great video here. You are on a roll with great content. Your delivery is spot -on and engaging.

rolanddensonjr
Автор

Thank you for your videos, very informative and clear explanation.

ruslankadyrkulov
Автор

And as always your explanation is the best:)

ЕгорБрызгалов-яя
Автор

Awesome content. Best I've found.

chulaabey
Автор

Hi, should i return from a method the IEnumerable interface or the concrete type? Thanks in advance.

alfonsdeda
Автор

what is this Dump() method? is it part of LINQ? I can't seem to find anything about it anywhere and Rider throws a "can't resolve symbol" error when trying to use it despite importing the LINQ library. Also, the IEnumerable declaration also throws an error on the type, saying that IEnumerable doesn't have type parameters. Thanks for any help.

toastyshrimp
Автор

Thank you, Anton.
Recently, I have found that IList.Insert(0, element) was 10 ~ 30 times faster than IList.Add(element)?
Does it relate to yield return?

okcharles
Автор

Maybe a dumb question but what are you programming in and why not visual studio?

dylanthomas
Автор

Not very well explained. Your example used in the first 7mins was confusing. Your examples are usually easier to follow.

charleswoodruff