title: LINQ string contains another string case insensitive
body: <p>I'm working in a C# Windows 8 Metro app and I'm trying to filter an <code>ObservableCollection&lt;T&gt;</code> using LINQ where a property contains some string, and I need that it will be case insensitive.</p>
  
  <pre><code> var searchResults = from _rest in App.ViewModel.Restaurants
                       where  _rest.Name.IndexOf(queryText,
                                   StringComparison.CurrentCultureIgnoreCase) &gt;= 0
                       select _rest;
  </code></pre>
  
  <p>I work around</p>
  
  <ul>
  <li><code>Using string1.Contains(string2).ToUpper()</code> in both strings.</li>
  <li><code>Using string1.Contains(string2).ToLower()</code> in both strings.</li>
  <li><code>Using string1.IndexOf(string2, StringComparison.CurrentCultureIgnoreCase) &gt;= 0</code>.</li>
  <li><code>Using string1.IndexOf(string2, StringComparison.OrdinalIgnoreCase) &gt;= 0</code>.</li>
  <li><code>Using String.Compare(string1, string2, StringComparison.CurrentCultureIgnoreCase)</code>.</li>
  </ul>
  
  <p>But no one of this methods works for me in a case insensitive way, works ok if I write the name correctly.</p>
  
  <p>Has someone have the same issue in Windows 8??</p>
  
  <p>Thanks in advance for any help provided.</p>