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]