Enumerables (IEnumerable, IEnumerator) | C# Programming Tutorials Beginners: 17

Sdílet
Vložit
  • čas přidán 30. 12. 2018
  • Support Me: / angelsix
    Part of the series of tutorials on programming C# for beginners
    Understand what enumeration, enumerators and enumerable are, how we create them and when and why we use them
  • Zábava

Komentáře • 139

  • @Aeroxima
    @Aeroxima Před rokem +8

    Really helpful in understanding what's actually going on. A lot of tutorials try to simplify things so much it actually makes it harder, or just blow over things like "that's just what you write and you get the answer" or are so technical it goes over my head. This is just right for making sense of something that keeps coming up and kept feeling intimidating.

  • @awdwadawda352
    @awdwadawda352 Před 7 dny

    Thank you for taking the time to explain this so well!

  • @anton9410
    @anton9410 Před rokem +3

    Amazing explanation that actually goes into the logic behind name and usage! There have been some changes in .Net6 and the IEnumerable @3:25 is actually wrapped by IList. You'll just have to press F12 once you click on IList and then you will find IEnumerable

  • @electroqt1671
    @electroqt1671 Před 2 lety

    Thank you for this amazing video it's better than any article I could find on the internet that explains this concept!!

  • @Hasack
    @Hasack Před rokem

    Great video thanks - demystifying something that sounds complicated on the outside but you’ve explained in a really easy to understand way.

  • @RonnieBanerjee007
    @RonnieBanerjee007 Před 3 lety +13

    This is the best explanation out there!! This is totally a Computerphile worthy explanation!! Great job!!

    • @DiscipleW
      @DiscipleW Před 2 lety

      There is a cool book about it:
      C# 8.0 and .NET Core 3.0 - Modern Cross-Platform Development - Fourth Edition

    • @thomasjust2663
      @thomasjust2663 Před 2 lety

      The accent ruins most of it, but o well

  • @das_evoli
    @das_evoli Před 2 lety +1

    Thank you. It's really straight forward. For whatever reason when I just read 'IInterfacesomething' my brain already blocks because they look so scary

  • @juanjosesantos7757
    @juanjosesantos7757 Před 5 lety

    Great tutorial! Keeping it nice and simple, good quality and explanations. Keep up the good work! Thanks for sharing this videos

  • @kopilkaiser8991
    @kopilkaiser8991 Před rokem

    It was helpful and resourceful. Thank you for giving in such efforts to teach us willingful C# beginners. Much appreciated bro.

  • @TheMohsell
    @TheMohsell Před 5 lety +4

    Happy new year Luke. Man I was waiting for theCZcams notification

  • @longuinni
    @longuinni Před 5 lety +4

    It's nice to see that you are back!!! Happy new year Angelsix!

  • @muriloteixeira5541
    @muriloteixeira5541 Před 3 lety

    You make the best explanation. Thanks!

  • @williamgao3682
    @williamgao3682 Před 5 lety

    Happy new year, it's great to see you again :)

  • @RealMitl
    @RealMitl Před rokem

    Thanks for the great explanation. Really helpful!

  • @skatevolcom433
    @skatevolcom433 Před 5 lety

    Thanks for this! I'm looking forward to your videos on IQueryable and LINQ

  • @aduseijeffery7876
    @aduseijeffery7876 Před 5 lety

    Happy New Year Luke! Amazing explanation over there.

  • @raymondvanhoorn
    @raymondvanhoorn Před 2 lety

    Thank you for this clear explanation!

  • @kajij
    @kajij Před 5 lety +2

    I appreciate the effort in your videos. There are far less informative tutorials compared to yours on other platforms which even cost money. Thank you for doing this.

  • @kamilmikua5794
    @kamilmikua5794 Před rokem

    I'm surprised about depth of explanation, very nice!

  • @kentswan3230
    @kentswan3230 Před 3 lety

    THANKS! Best explanation ever

  • @705am
    @705am Před 5 lety +2

    been waiting :) welcome back , master ^^

  • @nurbolyskakov6590
    @nurbolyskakov6590 Před 4 lety

    Good, Thank you for explanation. Keep going!

  • @ganim949
    @ganim949 Před 3 lety +1

    Thanks a lot, this is so helpful

  • @kingcarmichael
    @kingcarmichael Před 3 lety

    Great explanation. Thank you!

  • @kellybmackenzie
    @kellybmackenzie Před rokem

    This is amazing, thank you so much!!

  • @TheLecoste
    @TheLecoste Před rokem

    great vid tbh would recommend to anyone who is at this stage to take 20 mins to watch this vid... I would however not mark this as Beginners. Your speed and the topic is for me beyond Beginner stage.

  • @persoulrpg
    @persoulrpg Před 5 lety

    Long time no see :) Finally ur back. Happy new year.

  • @imadabab
    @imadabab Před 3 lety

    Excellent tutorial. Thanks a lot. I have subscribed.

  • @jonskislo1
    @jonskislo1 Před 3 lety

    wow @ the quality. Great job!

  • @hutchm92
    @hutchm92 Před 5 měsíci

    Thank you! So helpful!

  • @attilavarkonyi7066
    @attilavarkonyi7066 Před 4 lety +1

    Thank you very much! This was pretty clear!

  • @AbdullahKhan-dl9lm
    @AbdullahKhan-dl9lm Před 2 lety

    Good explanation, good example

  • @Slimboyfat1979
    @Slimboyfat1979 Před 2 lety

    I am still confused with this but I think after studying the video I will get it. Thanks for the video, very helpful

  • @mustafaazyoksul1372
    @mustafaazyoksul1372 Před 4 lety

    Hey man. I love your content. Keep up your good work.
    1 question tho. 17:00 will you keep this series going?

  • @srinivasaraoyp3640
    @srinivasaraoyp3640 Před 4 lety

    Very interesting .Thank you.

  • @imAskja
    @imAskja Před 5 měsíci

    Awesome intro. Great info.

  • @turn1210
    @turn1210 Před 5 lety

    Hi Luke, I have a video (series?) request. Would you have any advice for those thinking of setting up a software company, getting the word out and getting those first few sales in? I think lots of us would love to do this but there is a lack of advice about the non software side. Any advice you can offer would be much appreciated.

  • @TAURENIO
    @TAURENIO Před 5 lety

    Happy New year from Dominican republic.

  • @icn2083
    @icn2083 Před 5 lety

    Happy New Year and thanks a lot for your informative videos.

  • @TheMichuny25
    @TheMichuny25 Před 5 lety +5

    Hi AngelSix, thanks for creating amazing content. I would like to know whether you are going to do some videos about C# 8.0 and .NET Core 3.0? I would appreciate that so much!

  • @user-ql2zw3bg1l
    @user-ql2zw3bg1l Před 2 lety

    Great Lesson Thank you

  • @dpetrik99
    @dpetrik99 Před 4 lety

    Thanks great! That's really good explanation!

  • @chamir4614
    @chamir4614 Před 5 lety

    Finally ure back, Happy Year !!

    • @AngelSix
      @AngelSix  Před 5 lety +2

      I know. That was a crazy 2 months! Back at it now though, although I go CES next week so WPF video will be week after

  • @__whoKnows
    @__whoKnows Před 4 lety +4

    This is Marvelous Tutorial ~~very Helpful
    Big Thanks From Taiwan~~~~

    • @milesparker5432
      @milesparker5432 Před 3 lety

      I know it's kinda randomly asking but do anyone know a good website to stream new movies online ?

    • @ishaancurtis620
      @ishaancurtis620 Před 3 lety

      @Miles Parker Try Flixzone. You can find it on google :)

  • @mohammadAnwer786
    @mohammadAnwer786 Před 5 lety

    I love to see his face . Great Man (Respect )

  • @tomasmichael3576
    @tomasmichael3576 Před 2 lety

    You're the best!

  • @his-worddevotionals540

    You are the man.

  • @shadowthejudgehog9081

    SIR YOU ARE THE BEST

  • @RioTheHitman
    @RioTheHitman Před 5 lety +3

    Yaah youre back welcome back

  • @wildKawa
    @wildKawa Před rokem

    Thanks for the tutorial, very helpful!
    Just can't get over scrolling in Coding tutorials, it makes it almost impossible for me to keep track at that point.

  • @kerandonovan7255
    @kerandonovan7255 Před 3 lety

    Great explanation

  • @EjMacarus
    @EjMacarus Před 3 lety

    Well done!

  • @abdelkiki
    @abdelkiki Před 3 lety

    Thank you for this video

  • @patrikbak8161
    @patrikbak8161 Před 5 lety +4

    Great explanation.

  • @FilipMarzec_
    @FilipMarzec_ Před 4 lety

    nice and helpful, thanks

  • @nahuelherrera7301
    @nahuelherrera7301 Před 3 lety

    Buena explicacion, gracias

  • @higherpurpose1212
    @higherpurpose1212 Před 2 lety +3

    Great explanation and tutorial! The second half is not as simple so I might have to rewatch, but thanks for this!

  • @ianturner2229
    @ianturner2229 Před 3 lety +2

    Excellent Tutorial , after watching it (several times) I managed to create a similar IEnumerable for strings, and then, to prove I understood it, I created one to handle a complex Class Object named BankAccounts to it, and to my huge surprise, after a bit of to and froing with it, it actually worked after some issues converting the objects of this type being passed to the Enumeration code.
    One stumbling block I hit was that I wanted to pass a LIst in place of the arrays you have used, so rather than a BankAccount [ ], which it accepts, it doesn't seem to allow a List object to be used internally to the IEnumerable/IEnumerate system ?? I therefore had to grab the data from my "Test" system, into a list form it's Dictionary format, and then create an array from that with .ToArray() which is a bit clunky.
    Is there any way to use Lists in this functionality, or are we stuck with internal arrays ?
    Thanks again for teaching me me how to do this - Great stuff.

  • @VinuP2023
    @VinuP2023 Před 5 lety

    Happy new year Brother, thank you for very nice video.

  • @sunova_
    @sunova_ Před rokem

    I dont quite understand when you would want to use this. It just seems easier to have a List and loop over it when I need to do such things. Any simple real-world example of when it's best to go for IEnumerable? Is it merely to control iterating over a list of unknown length, one at a time so you don't store the entire list in memory?

    • @AngelSix
      @AngelSix  Před rokem +1

      Mainly when you don't want to load a large list into memory all at once, loading over network on infinite scroll, or dynamically generated lists that can be calculated. So saves memory and speed up loading

  • @Giannis_Krimitzas
    @Giannis_Krimitzas Před 3 lety

    Thank you

  • @ShayanFiroozi1
    @ShayanFiroozi1 Před 4 lety

    Hi , We are waiting for Advanced C# please ! in my opinion it's better to do a real world app and in the middle explain new things ;) thanks

  • @bastedboyderzthine
    @bastedboyderzthine Před 5 lety

    Happy New Year bro..

  • @noahb5019
    @noahb5019 Před 4 lety

    You are awesome!

  • @Nazir5593
    @Nazir5593 Před 5 lety

    How many more parts are left? Please continue to make more, best tutorials ever on C#

    • @AngelSix
      @AngelSix  Před 5 lety

      I'm going to do a new C# series, much more professional, start to finish, hopefully a video every other day, once I get back into these videos shortly

  • @sebastiankumlin9542
    @sebastiankumlin9542 Před 4 lety

    Useful

  • @arrogantermistkerl4579

    Great stuff Sir thank you for the work you put in this. I have a noobish question maybe someone reading these might help. Where are the function of the IEnumerator interface for the Array for example MoveNext() implemented? IMHO it should have been implemented by the the class Array but I don't see any function called MoveNext() in the list of methods in 03:01. While I am already at it is there a way to see the internal implementations of those methods?

    • @AngelSix
      @AngelSix  Před 4 lety

      An array is not enumerable. It is a known size. MoveNext is there because enumerators do not necessarily know their size, or if something is next until its enumerated over. An array is fixed size so you can just loop ForEach

    • @arrogantermistkerl4579
      @arrogantermistkerl4579 Před 4 lety

      @@AngelSix Thank alot for answering, still I am wondering the Class Array implements the Interface IENUMERABLE and so the class array implements the function GetEnumerator which itself hast to return an Enumerator that Enumerator has to be specific for the array. I still dont get where that special ArrayEnumerator with its special functions is created. Is it done in the implementation of Getenumerator()?

    • @AztecPyramid
      @AztecPyramid Před 8 měsíci

      I think that because the Array implements IEnumerable, it must implement a function called GetEnumerable(); It is that Enumerable class that implements the MoveNext() method.

  • @TheAlphaGeko
    @TheAlphaGeko Před 5 lety +9

    Happy new year ^^

  • @assa716
    @assa716 Před 4 lety

    Thanks!

  • @tracetv8115
    @tracetv8115 Před 5 lety

    First of all, thank you for your greet content!!! It´s awesome. I´m a new programmer and i love your videos. Is it possible to make a video to Component Object Model?

  • @OT-tn7ci
    @OT-tn7ci Před rokem

    Would be nice if you could post the source code for videos like this. Not everything, this seems a bit more theory so having source code on my own screen and studying it I think would help me learn faster.

  • @Layarion
    @Layarion Před 5 lety

    can you make a video on Yield Return?

  • @zerosandones7547
    @zerosandones7547 Před 3 lety

    are all collections considered as objects in c#?

  • @essaidbn1415
    @essaidbn1415 Před 5 lety

    Happey new year

  • @leonvieira3877
    @leonvieira3877 Před 3 lety

    Lovin the hairstyle.

  • @DoomCatcher
    @DoomCatcher Před 2 lety

    Did you ever create the follow up LINQ video? I can't f find it .

    • @AngelSix
      @AngelSix  Před 2 lety

      If it's not in playlist then no

  • @lolicon1416
    @lolicon1416 Před 5 lety

    Happy New Year~

  • @chiefxtrc
    @chiefxtrc Před 4 lety +1

    Bummer the series end right at this point as I was looking specifically for something on the IQueryable interface

    • @AngelSix
      @AngelSix  Před 4 lety +1

      The new series will cover everything

  • @zerosandones7547
    @zerosandones7547 Před 3 lety

    is iteration equal to enumeration?

  • @skkat7336
    @skkat7336 Před 2 lety

    Dude that is some sick hair

  • @chamir4614
    @chamir4614 Před 5 lety

    Have not thought about making the server in discord?

  • @mackopop1371
    @mackopop1371 Před 5 lety

    It would be better if you show more code lines at the time.

  • @Xt3rmn
    @Xt3rmn Před rokem

    Kool hair bro

  • @tehfot
    @tehfot Před 3 lety

    When should we use IEnumerator instead of a loop?

    • @lordmorgoth7
      @lordmorgoth7 Před 3 lety

      Most likely never, it is good for understanding generic classes innerworkings

  • @lukegraf9365
    @lukegraf9365 Před 4 lety +1

    You should post this on git mate. Nonetheless. Great vid!

  • @Layarion
    @Layarion Před 5 lety

    holly fuck that's a good cam you got there, i'd think you were the real thing if some 3d was added.

  • @aminabouhamra5359
    @aminabouhamra5359 Před 4 lety

    Thanks for the explanation but mIndex in the reset should be -1 not 0

    • @AngelSix
      @AngelSix  Před 4 lety

      No it should be 0. Current is filled out at the start. You do not call MoveNext first, you check current first

    • @conaxlearn8566
      @conaxlearn8566 Před 4 lety

      @@AngelSix In that case, 16:17 mIndex should also be initialised to 0 instead of -1? Otherwise it doesn't make sense that it is initialised with one value but reset to a different value?

  • @furqanmalik2410
    @furqanmalik2410 Před 3 lety

    You look like Jason Broody from Far Cry 3 hahaha

  • @ravanin
    @ravanin Před 5 lety

    Dumb, perhaps very dumb question, what is te purpose of those $ on the console write lines??

  • @patrickwildschut5750
    @patrickwildschut5750 Před 5 lety

    If you’re not English: 0,75 speed

  • @victorvoiz8839
    @victorvoiz8839 Před 3 lety

    +rep for 4K

  • @AG45.
    @AG45. Před 4 lety

    What a haircut
    ___ ___
    ? ?
    (=====)

  • @stewiegriffin6503
    @stewiegriffin6503 Před rokem

    I just gave up at 14.00

  • @kcvinu
    @kcvinu Před 3 lety

    Everything was simple when we use just a for loop to iterate over a collection. Now, the code looks horrible.

  • @sebastiankumlin9542
    @sebastiankumlin9542 Před 4 lety

    3:04 It returns an IEnumerator

  • @user-ii4td6qt8d
    @user-ii4td6qt8d Před 2 měsíci

    More of an intermediate explanation. As a beginner you were saying and doing things without actually explaining what you were doing.

  • @programmingtacticalcode7968

    Your hair is crazy ....

  • @justingiovanetti
    @justingiovanetti Před 4 měsíci

    Kinda hard to follow.

  • @MorgurEdits
    @MorgurEdits Před 4 lety

    beginner? :D

    • @AngelSix
      @AngelSix  Před 4 lety

      Check our my current series, it starts from very basics

    • @MorgurEdits
      @MorgurEdits Před 4 lety

      @@AngelSix btw is it possible to use that IEnumerable.Current with just a foreloop or does it need to be constructed as in the video to be able refer to IEnumerable from other classes as well?

  • @thomasjust2663
    @thomasjust2663 Před 2 lety

    The accent and the speed this guy speaks, makes very troublesome to bear...sorry thumbs down

    • @AhmedElsayed-ur1iy
      @AhmedElsayed-ur1iy Před 2 lety

      the speed is freaken perfect dude finally a youtube video that i dont have to play on 2x speed cause the teacher is so boring and slow