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

Поделиться
HTML-код
  • Опубликовано: 22 янв 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.

  • @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 3 дня назад

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

  • @bilkisuismail6096
    @bilkisuismail6096 Год назад +5

    These lectures are great

  • @GalaxyCookies76
    @GalaxyCookies76 2 месяца назад

    Amazing Tips guys need to see more

  • @ADAM63639
    @ADAM63639 Год назад +4

    Excellent teachers

  • @kvelez
    @kvelez 4 месяца назад

    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);

  • @anagabriella5463
    @anagabriella5463 11 месяцев назад +3

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

  • @pensivetrout1126
    @pensivetrout1126 2 месяца назад +2

    4:25 "hat tuah"

  • @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 4 месяца назад

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

    • @helkade
      @helkade 3 месяца назад

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

    • @PepoWarGames
      @PepoWarGames 2 месяца назад

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