C# – Check if a string contains any substring from a list

There are many different scenarios where you might want to check a string against a list of substrings. Perhaps you’re dealing with messy exception handling and have to compare the exception message against a list of known error messages to determine if the error is transient or not. When you need to check a string … Read more