I have a c# project and a log file with errors. I want to give all errors on a new log file out with a counter if there are some errors twice or more. I used the command:
bool alreadyExist = fails.Contains(line);
This works really good, but I want also a counter, to show how many times I have the same line in a log file.
Using Regex: