Kriti

Kriti

  • NA
  • 60
  • 0

ignore cases in strings

Apr 23 2010 5:55 AM

private void listboxOP_SelectedIndexChanged(object sender, EventArgs e)
{

String tempValue;
foreach (Object obj in listboxOP.SelectedItems)
{
tempValue = (
String)obj;

if (tempValue == "Employee data")
{
//perform some operations
}
}
}
My program should handle the case sensitive.
Even if user enters "employee data" in Upper case or lower case or combination of both uppercase and lowercase ,It should enter the loop.
How can i handle case-sensitiveness?

Answers (2)