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

Sdílet
Vložit
  • čas přidán 9. 11. 2023
  • View full playlist: aka.ms/dotnet/beginnervideos/...
    Set up C# in VS Code: aka.ms/dotnet/get-started/vscode
    🏆Earn the C# Certification: aka.ms/csharp-certification
    David and Scott continue our conversation about Lists and another new topic, arrays! Learn about the similarities and differences between these structures and when to use each of them.
    Links:
    .NET Beginner Videos: aka.ms/dotnetvideos
    MS Learn: aka.ms/dotnet/beginnervideos/...
    Blog: aka.ms/dotnet/blog
    Twitter: aka.ms/dotnet/twitter
    TikTok: aka.ms/dotnet/tiktok
    Mastodon: aka.ms/dotnet/mastodon
    LinkedIn: aka.ms/dotnet/linkedin
    Facebook: aka.ms/dotnet/facebook
    Docs: learn.microsoft.com/dotnet
    Forums: aka.ms/dotnet/forums
    🙋‍♀️Q&A: aka.ms/dotnet-qa
    👨‍🎓Microsoft Learn: aka.ms/learndotnet
    #dotnet #csharp
  • Věda a technologie

Komentáře • 8

  • @BlessedNdoro
    @BlessedNdoro Před 6 měsíci +5

    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!!!!

  • @bilkisuismail6096
    @bilkisuismail6096 Před 7 měsíci +3

    These lectures are great

  • @ADAM63639
    @ADAM63639 Před 8 měsíci +4

    Excellent teachers

  • @DookyButter
    @DookyButter Před 5 měsíci +2

    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.

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

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

  • @kvelez
    @kvelez Před 8 měsíci +3

    var names = new List() { "Kevin", "Joseph", "Raul", "Marco" };
    names.Add("Sophia");
    names.Add("Lucy"); // add bucket
    Console.WriteLine(names[names.Count-1]); // last element
    Console.WriteLine(names[^1]); // count from the back.
    Console.WriteLine();
    foreach (var name in names[2..4]) // ranges
    {
    Console.WriteLine(name);
    }
    Console.WriteLine();
    var people = new string[] { "Kevin", "Joseph", "Raul", "Marco" }; // array
    people = [..people, "Sophia", "Lucy"]; // new bucket
    people.ToList().ForEach(x => Console.WriteLine(x));

  • @hipertracker
    @hipertracker Před 3 měsíci

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