The string.Contains method returns a value indicating whether a specified string occurs within this string, but it is case sensitive. And there is no StringComparison version of string.Contains method available to use for case insensitive.

E.g. Running following lines of code 

var sample = "This is a test.";

var v1 = sample.Contains("Test");
var v2 = sample.Contains("test");
Console.WriteLine(v1);
Console.WriteLine(v2);

Produces result:

You can write a string extension method which takes StringComparison parameter and can be case insensitive if required.

public static class StringExtensions
{
    public static bool Contains(this string source, string substring, StringComparison comp)
    {
        return source?.IndexOf(substring, comp) >= 0;
    }
}

So, now its time to use it, I modified the sample program to use the string extension method, here is how it looks now:

var sample = "This is a test.";

var v1 = sample.Contains("Test", StringComparison.OrdinalIgnoreCase);
var v2 = sample.Contains("test");
Console.WriteLine(v1);
Console.WriteLine(v2);

and here is the output:

Conclusion

We created a string extension method Contains which accepts a StringComparison parameter, so we can use it for case-insensitive comparisons.