title: How to get index from List<string> of specific item?
body: <p>I have this List:</p>
  
  <pre><code>List&lt;string&gt; headers = new List&lt;string&gt;(); 
  headers.Add("Red"); 
  headers.Add("Blue"); 
  headers.Add("Green");
  headers.Add("Black");
  </code></pre>
  
  <p>And I have this function:</p>
  
  <pre><code>private int getColorIndex(string colorName , List&lt;string&gt; headers)
  {
       int index = LINQ;
  }
  </code></pre>
  
  <p>In <code>getColorIndex</code> function I want to write LINQ that returns the index of specific color from headers list(in colorName variable).</p>
  
  <p>For example if colorName is <strong>black</strong> the value of index will be 3.</p>
  
  <p>The <code>colorName</code> can contain big or small letters.</p>
  
  <p>For example:</p>
  
  <pre><code>  colorName = Black or colorName = black
  </code></pre>
  
  <p>Any idea how can I write this LINQ?</p>