Answers for "contains case insensitive c#"

0

c# case insensitive compare

string str1 = null;
string str2 = "london";

str1?.Equals(str2, StringComparison.CurrentCultureIgnoreCase); // true
Posted by: Guest on May-24-2021
0

c# Case insensitive Contains(string)

// To test if the string paragraph contains the string word
culture.CompareInfo.IndexOf(paragraph, word, CompareOptions.IgnoreCase) >= 0
Posted by: Guest on July-01-2021
0

How to make String.Contains case insensitive?

Assert.IsTrue(text.ToUpper().Contains("Sample".ToUpper()));
Posted by: Guest on May-18-2020

Code answers related to "contains case insensitive c#"

Browse Popular Code Answers by Language