Linked Questions

77 votes
3 answers
175k views

How can I make the following case insensitive? myString1.Contains("AbC")
CJ7's user avatar
  • 23.4k
46 votes
5 answers
50k views

With Contains() method of String class a substring can be found. How to find a substring in a string in a case-insensitive manner?
Falcon's user avatar
  • 507
17 votes
7 answers
33k views

I am comparing two strings using following code string1.Contains(string2) but i am not getting results for case insensitive search. Moreover I cant use String.Compare coz i dont want to match the ...
PhOeNiX's user avatar
  • 295
9 votes
1 answer
16k views

I am sorting a list of elements: var matchEle = listOfElements.Where(e => e.Properties().Any(p => p.Name.Contains("Key", Asking for IEqualityComparer))).First(); I am used to just going ...
AndyBernard's user avatar
2 votes
2 answers
7k views

I want to check whether string below contains top/ TOP/toP/ Top/TOp/ Top in c#. My code is like string str = null; str = "CSharp Top11111 10 BOOKS"; if (str.Contains("top") == true) ...
S M's user avatar
  • 3,253
0 votes
2 answers
16k views

I have made a software in vb.net that has a specific purpose. It has to compare two strings at a particular point, say they are x and y. The code is If x.Contains(y) then 'do things here End If If y ...
Kashish Arora's user avatar
-2 votes
5 answers
876 views

How can I test whether a substring is contained in other, but case-insensitively? string1.Contains(string2) is not case insensitive. if there is no existing method, I would want to write a optimized ...
Ankit's user avatar
  • 6,622
4 votes
3 answers
1k views

I have a list that holds a few strings(names). For this example. It will hold: TeSt1 TeSt2 TeSt3 And I'm trying to check if that list has one of those. And I'm doing this like this at the moment: if (...
Stian Tofte's user avatar
-5 votes
2 answers
7k views

Is the string-method .Contains case-sensitive in .Net? For example: string str1 = "tEst"; string str2 = "Te"; Boolean bool = str1.Contains(str2);
nissedanielsen's user avatar
9 votes
1 answer
403 views

I have this if else statement which is assigned to compare results from a text box to a list of context. I am wondering how do i make it such that it is case insensitive ? value = textbox1.Text; if (...
user2691544's user avatar
0 votes
3 answers
2k views

Need to have string comparison case insensitive for .net winforms application. It is not a problem when strings are compared in my code, but I need this everywhere. For ex.: there is combobox with ...
Dmitry's user avatar
  • 15
1 vote
2 answers
3k views

IQueryable<MyModel> myList = GetListMyModel().AsQueryable(); myList = myList.Where(m => m.Name.Contains('John')); I want to return everything with Name = 'John' or 'john' or 'JOHN' (case-...
J - C Sharper's user avatar
0 votes
4 answers
331 views

I tried several solutions from the internet an worked myself through some tutorials but I am not able to make it work. I try to match a word in a string with random letters, numbers or dots before and/...
Shazy's user avatar
  • 147
-1 votes
2 answers
1k views

if (!lstFieldData.Items.Contains(ItemValue)) MessageBox.Show(ItemValue + "Item not found."); Above code is to get the list of items that is not in the list. Now i want to check this with ...
DDave's user avatar
  • 618
3 votes
2 answers
341 views

I have been working out for a case-insensitive search for hours and I still can`t find a solution... I have data stored in MongoDB and formatted like this : { id: 12345, name: "foo", area: ["...
Liu Junhan's user avatar

15 30 50 per page
1
2 3 4 5
12