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

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ธ.ค. 2024

ความคิดเห็น • 143

  • @Aeroxima
    @Aeroxima 2 ปีที่แล้ว +9

    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.

  • @anton9410
    @anton9410 ปีที่แล้ว +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

  • @RonnieBanerjee007
    @RonnieBanerjee007 4 ปีที่แล้ว +13

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

    • @YPLabs
      @YPLabs 3 ปีที่แล้ว

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

    • @thomasjust2663
      @thomasjust2663 3 ปีที่แล้ว

      The accent ruins most of it, but o well

  • @das_evoli
    @das_evoli 2 ปีที่แล้ว +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

  • @GreaterOrEqual0
    @GreaterOrEqual0 2 ปีที่แล้ว

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

  • @Hasack
    @Hasack ปีที่แล้ว

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

  • @kingcarmichael
    @kingcarmichael 3 ปีที่แล้ว

    Great explanation. Thank you!

  • @TheLecoste
    @TheLecoste ปีที่แล้ว

    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.

  • @awdwadawda352
    @awdwadawda352 6 หลายเดือนก่อน

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

  • @kopilkaiser8991
    @kopilkaiser8991 2 ปีที่แล้ว

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

  • @__whoKnows
    @__whoKnows 5 ปีที่แล้ว +4

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

    • @milesparker5432
      @milesparker5432 3 ปีที่แล้ว

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

    • @ishaancurtis620
      @ishaancurtis620 3 ปีที่แล้ว

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

  • @sunova_
    @sunova_ 2 ปีที่แล้ว

    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  2 ปีที่แล้ว +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

  • @longuinni
    @longuinni 6 ปีที่แล้ว +4

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

    • @AngelSix
      @AngelSix  6 ปีที่แล้ว

      Thanks. Happy new year

  • @RioTheHitman
    @RioTheHitman 6 ปีที่แล้ว +3

    Yaah youre back welcome back

    • @AngelSix
      @AngelSix  6 ปีที่แล้ว +1

      Finally :)

  • @muriloteixeira5541
    @muriloteixeira5541 3 ปีที่แล้ว

    You make the best explanation. Thanks!

  • @kamilmikua5794
    @kamilmikua5794 ปีที่แล้ว

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

  • @patrikbak8161
    @patrikbak8161 6 ปีที่แล้ว +4

    Great explanation.

  • @AbdullahKhan-dl9lm
    @AbdullahKhan-dl9lm 2 ปีที่แล้ว

    Good explanation, good example

  • @705am
    @705am 6 ปีที่แล้ว +2

    been waiting :) welcome back , master ^^

    • @AngelSix
      @AngelSix  6 ปีที่แล้ว +1

      Thanks :)

  • @raymondvanhoorn
    @raymondvanhoorn 2 ปีที่แล้ว

    Thank you for this clear explanation!

  • @imAskja
    @imAskja 11 หลายเดือนก่อน

    Awesome intro. Great info.

  • @imadabab
    @imadabab 3 ปีที่แล้ว

    Excellent tutorial. Thanks a lot. I have subscribed.

  • @TheMohsell
    @TheMohsell 6 ปีที่แล้ว +4

    Happy new year Luke. Man I was waiting for theTH-cam notification

  • @attilavarkonyi7066
    @attilavarkonyi7066 4 ปีที่แล้ว +1

    Thank you very much! This was pretty clear!

  • @chamir4614
    @chamir4614 6 ปีที่แล้ว

    Finally ure back, Happy Year !!

    • @AngelSix
      @AngelSix  6 ปีที่แล้ว +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

  • @kajij
    @kajij 6 ปีที่แล้ว +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.

  • @Slimboyfat1979
    @Slimboyfat1979 2 ปีที่แล้ว

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

  • @arrogantermistkerl4579
    @arrogantermistkerl4579 4 ปีที่แล้ว

    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  4 ปีที่แล้ว

      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 4 ปีที่แล้ว

      @@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 ปีที่แล้ว

      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.

  • @jonskislo1
    @jonskislo1 4 ปีที่แล้ว

    wow @ the quality. Great job!

  • @CAPS_AMERICA
    @CAPS_AMERICA 2 ปีที่แล้ว +3

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

  • @kentswan3230
    @kentswan3230 3 ปีที่แล้ว

    THANKS! Best explanation ever

  • @wildKawa
    @wildKawa ปีที่แล้ว

    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.

  • @ganim949
    @ganim949 4 ปีที่แล้ว +1

    Thanks a lot, this is so helpful

  • @Aryevang
    @Aryevang 6 ปีที่แล้ว

    Happy New year from Dominican republic.

  • @dpetrik99
    @dpetrik99 4 ปีที่แล้ว

    Thanks great! That's really good explanation!

    • @AngelSix
      @AngelSix  4 ปีที่แล้ว

      Glad I could help

  • @icn2083
    @icn2083 6 ปีที่แล้ว

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

    • @AngelSix
      @AngelSix  6 ปีที่แล้ว

      Thanks, happy new year

  • @williamgao3682
    @williamgao3682 6 ปีที่แล้ว

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

  • @kerandonovan7255
    @kerandonovan7255 3 ปีที่แล้ว

    Great explanation

  • @hutchm92
    @hutchm92 11 หลายเดือนก่อน

    Thank you! So helpful!

  • @ScrewY0UguyS
    @ScrewY0UguyS หลายเดือนก่อน

    Good, but you didn't examine the "yield return" statement. Basically, you can avoid implementing this whole IEnumerator interface (as its too big) and just use yield return to get value right from the GetEnumerator method. I don't know much about the underhood, but effectively compiler remembers the position in the code from where last "yield return" was called and continue executing function from the same spot.

  • @shadowthejudgehog9081
    @shadowthejudgehog9081 ปีที่แล้ว

    SIR YOU ARE THE BEST

  • @ianturner2229
    @ianturner2229 3 ปีที่แล้ว +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.

  • @skatevolcom433
    @skatevolcom433 5 ปีที่แล้ว

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

  • @TheAlphaGeko
    @TheAlphaGeko 6 ปีที่แล้ว +9

    Happy new year ^^

    • @AngelSix
      @AngelSix  6 ปีที่แล้ว

      Happy new year

    • @LawnMeower
      @LawnMeower 4 ปีที่แล้ว

      likewise

    • @theLegendPiyush
      @theLegendPiyush 4 ปีที่แล้ว

      Damn, do u think its happy??😂

  • @mohammadAnwer786
    @mohammadAnwer786 6 ปีที่แล้ว

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

  • @VinuP2023
    @VinuP2023 6 ปีที่แล้ว

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

    • @AngelSix
      @AngelSix  6 ปีที่แล้ว

      Happy new year

  • @DoomCatcher
    @DoomCatcher 2 ปีที่แล้ว

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

    • @AngelSix
      @AngelSix  2 ปีที่แล้ว

      If it's not in playlist then no

  • @kellybmackenzie
    @kellybmackenzie 2 ปีที่แล้ว

    This is amazing, thank you so much!!

  • @nurbolyskakov6590
    @nurbolyskakov6590 5 ปีที่แล้ว

    Good, Thank you for explanation. Keep going!

  • @TheMichuny25
    @TheMichuny25 6 ปีที่แล้ว +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!

  • @אורשני-ח4ד
    @אורשני-ח4ד 3 ปีที่แล้ว

    Great Lesson Thank you

  • @EjMacarus
    @EjMacarus 3 ปีที่แล้ว

    Well done!

  • @juanjosesantos7757
    @juanjosesantos7757 6 ปีที่แล้ว

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

  • @tomasmichael3576
    @tomasmichael3576 3 ปีที่แล้ว

    You're the best!

  • @turn1210
    @turn1210 5 ปีที่แล้ว

    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.

  • @zerosandones7547
    @zerosandones7547 3 ปีที่แล้ว

    are all collections considered as objects in c#?

  • @his-worddevotionals540
    @his-worddevotionals540 3 ปีที่แล้ว

    You are the man.

  • @srinivasaraoyp3640
    @srinivasaraoyp3640 5 ปีที่แล้ว

    Very interesting .Thank you.

  • @aduseijeffery7876
    @aduseijeffery7876 6 ปีที่แล้ว

    Happy New Year Luke! Amazing explanation over there.

  • @persoulrpg
    @persoulrpg 6 ปีที่แล้ว

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

  • @chamir4614
    @chamir4614 6 ปีที่แล้ว

    Have not thought about making the server in discord?

    • @semen083
      @semen083 5 ปีที่แล้ว

      It has done already.

  • @Nazir5593
    @Nazir5593 5 ปีที่แล้ว

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

    • @AngelSix
      @AngelSix  5 ปีที่แล้ว

      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

  • @chiefxtrc
    @chiefxtrc 4 ปีที่แล้ว +1

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

    • @AngelSix
      @AngelSix  4 ปีที่แล้ว +1

      The new series will cover everything

  • @mustafaazyoksul1372
    @mustafaazyoksul1372 5 ปีที่แล้ว

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

  • @tehfot
    @tehfot 4 ปีที่แล้ว

    When should we use IEnumerator instead of a loop?

    • @lordmorgoth7
      @lordmorgoth7 4 ปีที่แล้ว

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

  • @FilipMarzec_
    @FilipMarzec_ 4 ปีที่แล้ว

    nice and helpful, thanks

  • @bastedboyderzthine
    @bastedboyderzthine 6 ปีที่แล้ว

    Happy New Year bro..

  • @abdelkiki
    @abdelkiki 4 ปีที่แล้ว

    Thank you for this video

  • @Madzhkar
    @Madzhkar 2 หลายเดือนก่อน

    I still don't understand. Does anyone have any good resources for this?

  • @noahb5019
    @noahb5019 4 ปีที่แล้ว

    You are awesome!

  • @ShayanFiroozi1
    @ShayanFiroozi1 4 ปีที่แล้ว

    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

  • @Layarion
    @Layarion 5 ปีที่แล้ว

    can you make a video on Yield Return?

  • @OT-tn7ci
    @OT-tn7ci 2 ปีที่แล้ว

    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.

  • @nahuelherrera7301
    @nahuelherrera7301 4 ปีที่แล้ว

    Buena explicacion, gracias

  • @lolicon1416
    @lolicon1416 6 ปีที่แล้ว

    Happy New Year~

    • @AngelSix
      @AngelSix  6 ปีที่แล้ว

      Happy new year

  • @zerosandones7547
    @zerosandones7547 3 ปีที่แล้ว

    is iteration equal to enumeration?

  • @leonvieira3877
    @leonvieira3877 3 ปีที่แล้ว

    Lovin the hairstyle.

  • @tracetv8115
    @tracetv8115 6 ปีที่แล้ว

    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?

  • @lukegraf9365
    @lukegraf9365 5 ปีที่แล้ว +1

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

  • @aminabouhamra5359
    @aminabouhamra5359 4 ปีที่แล้ว

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

    • @AngelSix
      @AngelSix  4 ปีที่แล้ว

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

    • @conaxlearn8566
      @conaxlearn8566 4 ปีที่แล้ว

      @@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?

  • @sebastiankumlin9542
    @sebastiankumlin9542 4 ปีที่แล้ว

    Useful

  • @Giannis_Krimitzas
    @Giannis_Krimitzas 3 ปีที่แล้ว

    Thank you

  • @essaidbn1415
    @essaidbn1415 6 ปีที่แล้ว

    Happey new year

  • @ravanin
    @ravanin 6 ปีที่แล้ว

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

  • @mackopop1371
    @mackopop1371 5 ปีที่แล้ว

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

  • @patrickwildschut5750
    @patrickwildschut5750 5 ปีที่แล้ว

    If you’re not English: 0,75 speed

  • @sebastiankumlin9542
    @sebastiankumlin9542 5 ปีที่แล้ว

    3:04 It returns an IEnumerator

  • @skkat7336
    @skkat7336 3 ปีที่แล้ว

    Dude that is some sick hair

  • @Xt3rmn
    @Xt3rmn 2 ปีที่แล้ว

    Kool hair bro

  • @kcvinu
    @kcvinu 4 ปีที่แล้ว

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

  • @WhyetHiram-s7e
    @WhyetHiram-s7e 2 หลายเดือนก่อน

    Sim Tunnel

  • @Layarion
    @Layarion 5 ปีที่แล้ว

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

  • @furqanmalik2410
    @furqanmalik2410 4 ปีที่แล้ว

    You look like Jason Broody from Far Cry 3 hahaha

  • @stewiegriffin6503
    @stewiegriffin6503 2 ปีที่แล้ว

    I just gave up at 14.00

  • @HoraceHardy-v8l
    @HoraceHardy-v8l 2 หลายเดือนก่อน

    Maggio Track

  • @victorvoiz8839
    @victorvoiz8839 4 ปีที่แล้ว

    +rep for 4K

  • @PatrickIsherwood-k9n
    @PatrickIsherwood-k9n 8 หลายเดือนก่อน

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

  • @AG45.
    @AG45. 4 ปีที่แล้ว

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

  • @justingiovanetti
    @justingiovanetti 10 หลายเดือนก่อน

    Kinda hard to follow.

  • @MorgurEdits
    @MorgurEdits 4 ปีที่แล้ว

    beginner? :D

    • @AngelSix
      @AngelSix  4 ปีที่แล้ว

      Check our my current series, it starts from very basics

    • @MorgurEdits
      @MorgurEdits 4 ปีที่แล้ว

      @@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?