title: Check if case-insensitive string exist in List
body: <p>I have an error with my List. Let me show you my idea: I have a loop, when finish loop 1, value will add to List, and it will continue when finish loop. Finally, i will a List that include all value in each loop.</p>
  
  <p>Then, i want to check if value is exist in List. If exist, i will do something.</p>
  
  <p>Example: </p>
  
  <blockquote>
    <p>Loop 1: List: A</p>
    
    <p>Loop 2: List: A,B</p>
    
    <p>Loop 3: List: A,B,A</p>
  </blockquote>
  
  <p>Because value A is Exist in List. Then, i will do some thing if A exist in List</p>
  
  <pre><code>List&lt;string&gt; list = new List&lt;string&gt;();
  foreach (DataRow r in dt.Rows)
  {
    string Url = r["Url"].ToString();
    list.Add(Url);
    if (list.Contains(Url, StringComparer.OrdinalIgnoreCase))
      {
        //dosomething
      }
  }
  </code></pre>
  
  <p>But nothing happen. Wish you help me improve my code. Thanks !!!</p>