IEnumerable 🆚 IEnumerator Interfaces in C#

🚀 Master C# and .NET programming EASILY with our best-selling C# Masterclass: https://bit.ly/47Hk3u7 Today's Advanced C# Topic is: IEnumerable and IEnumerator Interfaces In this video you will learn what IEnumerable and IEnumerator are What are advantages of IEnumerable and IEnumerator When to use them How to use them What are advantages of using IEnumerable and IEnumerato How IEnumerator and IEnumerable are related to lists, arrays, and other types of colletions. The IEnumerable interface is the base Interface for many collections in C#, and its job is to provide a way of iteration through a collection. That is why we can use foreach loops to go through a List or a Dictionary. In simple English when a collection class implements the IEnumerable interface it becomes countable, and we can count each element in it individually There are 2 versions of the IEnumerable Interface 1.IEnumerable for generic collections 2.IEnumerable for non generic collections But since generic collections were introduced later after the non-generic ones and it is no longer recommended to use the non-generic collections in a new project due to their need to perform boxing and unboxing (converting the types of objects), we will explain how to use the IEnumerable T interface in this lesson when it is recommended to use the IEnumerable interface: Your collection represents a massive database table, you don’t want to copy the entire thing into memory and cause performance issues in your application. When it is not recommended to use the IEnumerable interface: You need the results right away and are possibly mutating / editing the objects later on. In this case, it is better to use an Array or a List ienumerable vs ienumerator C# implementing ienumerable and ienumerator use of ienumerable and ienumerator in c# ienumerator in c example ienumerable vs ienumerablet why we use ienumerable in c ienumerable vs enumerable c ienumerator in c# geeksforgeeks interface in c# with example code project tutorialsEU offers you free video tutorials about programming and development for complete beginners up to experienced programmers. This includes C#, Unity, Python, Android, Kotlin, Machine Learning, etc. Stay tuned and subscribe to tutorialsEU: https://goo.gl/rBFh3x