You can create your own extension method to do this:
public static bool Contains(this string source, string toCheck, StringComparison comp) { return source != null && toCheck != null && source.IndexOf(toCheck, comp) >= 0; }
And then call:
mystring.Contains(myStringToCheck, StringComparison.OrdinalIgnoreCase);
Tobia Zambon Jul 10 '13 at 6:39 2013-07-10 06:39
source share