C# – Ignore case with string.Contains()
By default, string.Contains() does a case sensitive search for a substring (or character) in a string. You can make it do a case insensitive search instead by passing in StringComparison.OrdinalIgnoreCase, like this: Note: StringComparison has three ‘ignore case’ options to choose from. Because this is doing a case insensitive search, it matched “earth” to “Earth” … Read more