title: C#: Finding and changing an element in an array of struct
body: <p>I have a struct <em>TableRow</em> and an array <em>table</em> of such structs:</p>
  
  <pre><code>table = new TableRow[10];
  </code></pre>
  
  <p>Now I want to find and manipulate the content of one of the structs in the array. <br>
  I use Array.Find to search the right array element:</p>
  
  <pre><code>var tr = Array.Find( table, tRow =&gt; tRow.color == 'red' );
  tr.count++;
  </code></pre>
  
  <p>Problem is that structs are value types and so the Find method returns a copy of the struct that I want to manipulate. Changing this copy does not change the struct in the array.</p>
  
  <p>I can't seem to find any way to instruct the Find method to return the struct by reference.</p>