I have a filter by text search in my wpf application. However when I do a string comparison to check if it contains a buzzword like, oh say "error", I want it to update/refresh my datagrid with all entries that have the Error keyword; regardless if I typed Error, or error, or eRRor in my search box.
Here is my code:
public class Foo 
{
  private void GetFilteredResults(MessageDetails detail, FilterEventArgs e)
  {
    foreach (MessageValue value in detail.MessageValue)
    {
       if (value.Value.Contains(txtFilterValue.Text))
       {
           //Returns true...
       }
    }
    //Otherwise false
  }
}
The Messagedetails is a container class and holds all of the datagrid row values.
The MessageValue is a struct that holds the actual message value in an ObservableCollection
Finally, the txtFilterValue is the control name of the textbox I am using to for my word filter
What I want to do is setup something to where I remove case sensitivity in order to cache all entries that match my keyword, regardless of how I type it. How would I go about that?
 
    