SyntaxFix
Write A Post
Hire A Developer
Questions
Use Enumerable.Contains function:
var result = !(compareString.Contains(firstString) || compareString.Contains(secondString));