[question] how to count and then remove duplicates in a list?

just started learning C# and i'm working on making the card game Go Fish as a first project. i have your hand stored as a list, how can i check if i have a pair?

ex. your hand: A 5 3 K 9 5 3

how can i count that there are two pairs (5 and 3) and then remove them from the list? i've been googling but i can't find exactly what i want.

by TotalMelancholy via /r/csharp

Leave a Reply