The Contains(...)
method for string is case-sensitive. I'd like to override it in order to make it case-INsensitive with the following code (which is stolen from here):
public static bool Contains(this string source, string toCheck, StringComparison comp)
{
return source.IndexOf(toCheck, comp) >= 0;
}
However, I don't know where the code should be pasted. Should it be placed inside the same namespace of the class program? Does it need a dedicated class?