Arrays, Lists, Indexing, and Foreach [Pt 13] | C# for Beginners

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ม.ค. 2025

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

  • @DookyButter
    @DookyButter 11 หลายเดือนก่อน +5

    2:25 [Ctrl] + [/] is a better commenting hotkey, albeit the one in the video is good to know b/c it is used in other Microsoft platforms such as SSMS.

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

    These lectures are great

  • @BlessedNdoro
    @BlessedNdoro ปีที่แล้ว +16

    Gets index out of range exception
    : "You told me to read these things ... but i'm just gonna panic and not read"
    Me: 🤣😂
    You guys are the best at teaching concepts!!!!

    • @voborny
      @voborny 9 วันที่ผ่านมา

      Never thought I'd end up ROFLing while learning how to code

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

    Amazing Tips guys need to see more

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

    Excellent teachers

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

    4:25 "hat tuah"

  • @anagabriella5463
    @anagabriella5463 11 หลายเดือนก่อน +3

    i dont know if im learning c#, how to use vs code or learning english. (im brazilian)

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

    2:54
    Read errors
    4:13
    var names = new List { "Some", "Name", "LastName" };
    Console.WriteLine(names[1]);
    Console.WriteLine(names[names.Count - 1]);
    Console.WriteLine(names[^1]);
    Console.WriteLine(names[^2]);
    foreach (var name in names[..^2])
    Console.WriteLine(name);

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

    why can't i say names.length-1? why count-1?

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

      It depends on the object being used. You just have to know which is implemented. Luckily, the editor will help you figure that out.

    • @olamideabass5587
      @olamideabass5587 4 หลายเดือนก่อน +1

      you use .Length for arrays and .Count for lists

  • @1conscience0dimension
    @1conscience0dimension 2 หลายเดือนก่อน +1

    Python is great for this. JS sucks not having introduced such things...
    edit: In fact, I still wonder why not doing the exact same thing as in another language, if it's already working well. As in python [2:4] [-2]...

  • @hipertracker
    @hipertracker 9 หลายเดือนก่อน +1

    names[^2] looks weird, names [-2] is more cleaner

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

      [-2] is not working in C# sadly, so that's why they used [^2]

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

      ​@@DasDron my keyboard doesn't even have this ^ character

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

      @@helkade num 6 (shift + num6 = ^)

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

    Another difference again... destructuring only 2 points. lol. Without autocomplete, it would be a nightmare between several languages. heil IA! instead of creating unity, men create division. I can't wait when language will be done by IA to be intuitive for humans. and why not using the spread operator on lists too... homogenization ! imagine it's done around 2024 when it seems that basic and simple stuffs are the most essential! But Bill Gates is not there anymore, things can evolve again... Sad he is now dealing with depopulation...