title: Linq - how to replace a lists property with value from another list where both keys are equal
body: <p>I have 2 lists groupoptions and dataIndicator</p>
  
  <pre><code>class groupoptions{
    ...
    GroupName string
  }
  
  class dataIndicator{
    ...
   HeaderID int
   IndicatorDescription
  }
  </code></pre>
  
  <p>currently my groupname possible values are 4 or 5 or 11</p>
  
  <p>first i want to get all dataindicators where headerid  is equal to GroupName, then replace those GroupNames with dataindicator's IndicatorDescription</p>
  
  <p>What would be the Linq syntax for this?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>using join</p>
  
  <pre><code>var newList = from first in dataIndicator
                        join second in groupedoptions
                        on first.HeaderID.ToString() equals second.GroupName
                        select new { first,second };
  </code></pre>
  
  <p>What next?
  PROBLEM: i want to do it inside a constructor that is being created inside a Linq Select</p>
  
  <pre><code>var list = xyz.Select(x =&gt; new groupoptions(){
     GroupName = x.Key.ToString();
   })
  </code></pre>