Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29745

Count duplicate items in a List and save them in different files (Or Lists/arrays/strings)

$
0
0

I need to count the duplicate values in List and save them in different files. With the name of file containing the email provider and number or duplicates.

The list always changes and has different values but it can look like that:

List<string> email_domains = new List<string>()     
{
    "gmail.com",
    "gmail.com",
    "outlook.com",
    "outlook.com",
    "outlook.com",
    "outlook.com",
    "ineria.pl",
    "mail.ru"
}

The result i want to get is something like this:

gmail.com [2]
outlook.com[4]

Viewing all articles
Browse latest Browse all 29745

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>