I want to get insensitive case entering the text from the textbox1.text. In Turkish language some letters like I,i cause problem. When I enter either small letter i or capital letter I, I want to get result.
Insensitive case
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Rajkiran SwainRank #165 · 14.4K reputationPosted Apr 9, 2023, 9:56 AM EDT
string userInput = textBox1.Text.ToLower(new CultureInfo("tr-TR"));Mehmet FatihRank #1,474 · 1.1K reputationPosted Apr 9, 2023, 10:04 AM EDT
I tried your proposal but it doesn't work if the first letter begins with the capital letter "I".
Naimish MakwanaRank #324 · 7.7K reputationPosted Apr 9, 2023, 11:38 PM EDT
Try below code:
using System.Globalization; // Get the input text from the textbox string input = textbox1.Text; // Create a CultureInfo object for the Turkish culture CultureInfo turkishCulture = new CultureInfo("tr-TR"); // Compare the input text to "some text" using a case-insensitive comparison if (string.Compare(input, "some text", turkishCulture, CompareOptions.IgnoreCase) == 0) { // Do something if the input matches the desired text }Thanks