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 - วิทยาศาสตร์และเทคโนโลยี
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.
You are welcome and I am glad my video was helpful. Thank you for the support.
Ur videos are great, please keep background music low...It empower your voice.
Thank you very much! Excellent explanation. Very comprehensible!
I’m glad you found it useful 🙏
This video was great thanks, been learning c# for about 2 months now and this was super informative without being long winded
I’m glad to hear that Oliver.
Refreshing on my c sharp. Great video!
thank you.
Nice tutorial. Just what I needed.
Thanks for watching!
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.
Thank you. To answer your question regarding IList, etc… look up Interfaces in C# that will answer your question.
@@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...??
Well done! Good luck with your channel! :)
Thank you for your support 🙏
Thank you for this video! It really helped
I’m glad you found it helpful.
Brilliant!
I understand why everyone is using lists of :D
U can also do var user1 = new User {} and for the loop you can do users.count or length
correct, you can also do that.
Nice explanation... Thanks...
Is there any instance where we should use dict over lists
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.
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.
My guy. Where did you get that shirt?
I found it on Amazon