C# Array vs Dictionary vs List a Beginners Guide in .NET

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ค. 2024
  • As a beginner programmer or developer, have asked yourself what are the differences between these three types of collections, arrays, dictionaries, and lists.
    In this video, I explain what are the features of each of these collections types. I will explain what an array is and the things you can do with an array. I also explain how in some situations it might be a better idea to use a dictionary instead of an array, I also touch on the advantages of using a list in the .NET ecosystem; whether you are using .NET framework or .NET core.
    Chapters
    0:00 Intro
    0:36 Console Application Setup Explanation
    3:45 How to populate an array in C#
    5:23 How to iterate through an array in C#
    8:03 How to populate a dictionary in C#
    9:57 How to iterate through a dictionary in C#
    11:30 How to search in a dictionary using a key in C#
    14:08 How to populate a list in C#
    15:05 How to iterate through a list in C#
    16:10 How to search in a list in C#
    19:30 Conclusion
    Important links
    INSTAGRAM: links.thedevlife.co/instagram...
    DISCORD: links.thedevlife.co/discord/t...
    FACEBOOK: links.thedevlife.co/facebook/...
    #thedevlife #array #dictionary #list
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    Thank you for the video. I have learnt quite a lot about the three collections, List, Array, and Dictionary types in depth. Also, I have learnt to declare class and creating objects to use with the collections. Moreover, some new methods to use to find and retrieve data from the list and dictionary. I have noted down the ways you hae utilised them. Thanks a lot for providing and sharing the knowledge to me and everyone else.

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

      You are welcome and I am glad my video was helpful. Thank you for the support.

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

    Ur videos are great, please keep background music low...It empower your voice.

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

    Thank you very much! Excellent explanation. Very comprehensible!

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

      I’m glad you found it useful 🙏

  • @oliverbolden7926
    @oliverbolden7926 2 ปีที่แล้ว +1

    This video was great thanks, been learning c# for about 2 months now and this was super informative without being long winded

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

      I’m glad to hear that Oliver.

  • @eddiegere
    @eddiegere 2 ปีที่แล้ว +1

    Refreshing on my c sharp. Great video!

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

    Nice tutorial. Just what I needed.

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

      Thanks for watching!

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

    Seriously sir the best explanation ever Thank You...!!! :) Can you also make an another video regarding ICollection, IList , IDictionary What is the use of it and what is the purpose..?? And When to use it..?? it will be very helpful.

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

      Thank you. To answer your question regarding IList, etc… look up Interfaces in C# that will answer your question.

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

      @@thedevlife thank you sir I'll search this topic and I'll try to understand it but if I can't understand Can you please make an another video Cause I've been following your video very much 🤩💯Now I've known write to API all the credit goes to you💯💯♥️ Can you help us...??

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

    Well done! Good luck with your channel! :)

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

      Thank you for your support 🙏

  • @Tahllia
    @Tahllia 2 ปีที่แล้ว +1

    Thank you for this video! It really helped

    • @thedevlife
      @thedevlife  2 ปีที่แล้ว +1

      I’m glad you found it helpful.

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

    Brilliant!
    I understand why everyone is using lists of :D

  • @nielsSavantKing
    @nielsSavantKing 2 ปีที่แล้ว +1

    U can also do var user1 = new User {} and for the loop you can do users.count or length

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

      correct, you can also do that.

  • @krishna-le8zq
    @krishna-le8zq 2 ปีที่แล้ว

    Nice explanation... Thanks...
    Is there any instance where we should use dict over lists

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

    Thanks for the video. Using List won;t internally iterate in loop to find the item? I am asking in terms of performance/efficiency. I agree with list having ability to search by any fields.

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

      I’m pretty sure it does, to be able to find an element you’d have to iterate through the collection. I just don’t know which algorithm is used under the hood.

  • @dylanhamilton9995
    @dylanhamilton9995 2 ปีที่แล้ว +1

    My guy. Where did you get that shirt?

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

      I found it on Amazon