The Dictionary Data Structure in C# in 10 Minutes or Less

preview_player
Показать описание
A powerful list type in C# that is not often used is the dictionary. In this video, I want to quickly go over what it is and how to use it effectively so that you can add this data structure to your toolbox.

Рекомендации по теме
Комментарии
Автор

We use Dictionary quite a bit. It's very helpful when needing to map things. You can basically serialize/deserialize one to JSON and use it as a file format among other things.

sparticus
Автор

Years ago I did tons of research on dictionaries and when I finally understood them I used them constantly.

leedavis
Автор

sorry 10 minutes 20 seconds you’ll have to update the title as this is clearly clickbait

path_selector
Автор

Would be interested in seeing a follow-up comparing a list of tuples vs a dictionary.

dasfahrer
Автор

Your videos are always helpful. Thanks!

acodersjourney
Автор

Would be great to see a follow up on this comparing Dictionary, List, and Datasets along with best use-case scenarios if you have the Great vid

ScottAshmead
Автор

Since people use Entity Framework a lot now, I think it is more important to explain hashtables as a concept in general as DbSet derives from HashSet, and Dictionaries are special kinds of it. The reason for the performance bump with Dictionaries in scalable systems is primarily due to it being a selfadjusting Array(List) of LinkedLists. In my country, interview questions are directly asked on this concept of hashtables from 2nd year onwards as most startups heavily use Dictionaries or use Entity Framework.

HolyRamanRajya
Автор

Thanks Tim for this great video! But sometimes it's just difficult for me to decide in what situation I should use dictionary.

StevenWong
Автор

Thanks for sharing Tim.

I use a dictionary mostly for finding and counting duplicates.

if
dictionaryObject[key]++;
else
dictionaryObject.Add(key, 1);

Sammy
Автор

Thanks for the video! how did Hogie get suggest for a correction? my spelling has crippled my code before

michaellyons
Автор

I actually use this all the time, to handle data that is usually presented in a table (especially in a database). Might not be quite as efficient as a 2D array, but it is much easier to develop methods around this, IMHO.

I've actually created a few types around this.

GodShiru
Автор

I LOVE the dictionary. I use it SO much!

rainbowsprinklez
Автор

Your next 10 video should be on concurrent dictionaries

AnySL
Автор

6:12 loving intellicode's concept of what makes a great wishlist 😂

simon-white
Автор

At our company we use dictionaries all the time.

b
Автор

Very useful video. Could we do sorting within values in a Dictionary?

gnitin
Автор

That's an amazing video, thank you so much, it's being really useful as I'm preparing for some jobs interview. Btw is this auto suggestion an extension or plugin that you use? Is better than the default one that I have. Thanks!

Allysson
Автор

i believe that some people use Dictionaries as their prefered method for writing Factories

LiveErrors
Автор

Thank you M.Corey. Is the intelissense Copilot?

darkmalk
Автор

Would you this as a default situation?

vinnypassmore