C# Hashsets - Understand them, use them, LOVE them

preview_player
Показать описание
🔥 What are HASHSETS? You SHOULD know that! Hint: It may be better than LIST?

📚 Or do you like to learn through BOOKS more? Our TINY C# PROJECTS BOOK!

We'll make sure to turn you into a true developer in no time!

TIMESTAMPS
00:00 Intro
00:15 What are Hashsets C#
03:15 This one is for you!
03:56 Examples for Hashsets C#
09:53 Thanks for watching!

C# Hashsets - Understand them, use them, LOVE them

So, what is C#?
C# (pronounced "See Sharp") is a modern, object-oriented, and type-safe programming language. C# enables developers to build many types of secure and robust applications that run in .NET. C# has its roots in the C family of languages and will be immediately familiar to C, C++, Java, and JavaScript programmers. This tour provides an overview of the major components of the language in C# 8 and earlier. If you want to explore the language through interactive examples, try the introduction to C# tutorials.

And what are Hashsets?
In C#, HashSet is an unordered collection of unique elements. This collection is introduced in .NET 3.5. It supports the implementation of sets and uses the hash table for storage. This collection is of the generic type collection and it is defined under System.Collections.Generic namespace. It is generally used when we want to prevent duplicate elements from being placed in the collection. The performance of the HashSet is much better in comparison to the list.

To learn more, make sure to watch the video, and we promise you that you'll become a better developer by the end of the video! Have fun!

#csharp #coding #tutorial #learn #microsoft #net #hashset #hash #collection #list

TAGS
Tutorials,Tutorial,Programming,Step by step,programmer,c#,.net,.net core,dotnet,core,asp,asp net,c sharp,csharp,hashset,linq to sql,c# hashset,visual studio,java,software engineering,c# oop,dictionary,visual c#,tutorial c#,coding,c# tutorial,learn coding,how to code,programming,dot net,c# generics,c# collection,generics in c#,collection in c#,c# list,c# collections,collection in .net,list,lists,array,beginner,arrays,2d array,c# arrays,c# array

TutorialsEU offers you free video tutorials about programming and development for complete beginners up to experienced programmers.
This includes C#, Unity, Python, Android, Kotlin, Machine Learning, etc.

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

I've worked with several languages including Java, C++, and Python. In my opinion C# (now dotnet core) has been the most comprehensive and clear syntax I've experienced with a lot of great new features with every new version. Just love it.

codeme
Автор

Under the arrays your adding stuff into the list not the array

kelvinclements
Автор

Hi there, someone probably mentioned this but your array section is adding to your list

wimlotz
Автор

Thank you Brother 😇 your videos help me to learn about .Net c#.

VivekSingh-ogtv
Автор

dude introduced hashsets to us like it's our lord and saviour. Now I am a disciple.

salihgireniz
Автор

Great video. According to you, what are the most used methods for HashSets?

ShivamSharma-sgdk
Автор

Great video. I find myself using collections more than hashsets in c#, because normally the data has key-value pairs (such as id and description). And in MVC drop downs for example normally require a key value pair like a selectlist. Do you have any thoughts on collections vs lists vs hashsets? After watching this I’m wondering if there are places I can simplify collections into hashsets, or do you find most real-life apps require collections because we normally have unique ids associated with our data?

michaelgervasoni
Автор

The functionality you describe and show is great, but God forbid someone choses to do this, unless the data has already been retrieved, in application code. This should be done by the database; after all, it’s actually BUILT with data manipulation as it’s primary purpose. I can do all the stuff here with the Distinct, Group By, and Join clauses of SQL.

In any case, the fact that the data is keyed on it’s actual hashcode is useful for various scenarios. In the data world, that’s called a natural key, and it means that the key IS the data, so it’s very fast at retrieving data. Using hashsets, of course, can very quickly lead to custom implementations of GetHashcode for objects added to the set.

Good video all the same.

rmcgraw
Автор

Just curious, is this quicker than LINQ using Distinct() ?

BluetonicUK