title: How to use LINQ to get DataGridView cell Value
body: <p>Is there a possibility to use a LINQ query to receive the Value of the highlighted Cells? In the figure below, i can only count the highlighted cells in the DatGridView and pass the count number in a listBox.  </p>
  
  <pre><code>var foundColor = dataGridView1.Rows.Cast&lt;DataGridViewRow&gt;().Select(row =&gt; new 
  {  
    Count = row.Cells.Cast&lt;DataGridViewCell&gt;().Count(c =&gt; c.Style.BackColor == Color.Yellow),
    Name = row.Cells.Cast&lt;DataGridViewCell&gt;().Where(x =&gt; x.Style.BackColor == Color.Yellow)
  }).ToList();
  
  foundColor.ForEach(s =&gt; listBox3.Items.Add($"{s.Count},{s.Name}"));
  
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/yWPN8.jpg" alt="DataGridView Sample"></p>