title: Linq GroupBy and take the entry which is not null
body: <p>The class Selection has 4 properties:</p>
  
  <pre><code>public class Selection
  {
      string IdSelectionType {get; set;}
      string Name {get; set;}
      decimal? OddValue {get; set;}
      bool Visible {get; set;}
  }
  </code></pre>
  
  <p>The examples data</p>
  
  <pre><code>var originalList = new List&lt;Selection&gt;()
          {
              new Selection() {IdSelectionType = "1", Name = "Under (75.50)", Visible = true},
              new Selection() {IdSelectionType = "2", Name = "Under (75.50)", Visible = true},
              new Selection() {IdSelectionType = "1", Name = "Under (75.50)", OddValue = 1.840m, Visible = true},
              new Selection() {IdSelectionType = "2", Name = "Under (75.50)", OddValue = 1.860m, Visible = true},
          };
  </code></pre>
  
  <p>I'd like to select a list where the elements with OddValue = null are discarded if there is another element which is identical but with the OddValue != null.</p>
  
  <p>Is there any Linq / MoreLinq operator to do something similar?</p>
  
  <pre><code>Selections.GroupBy(s =&gt;
            new {s.IdSelectionType, s.Name, s.OddValue, s.Visible})
            .Select(g =&gt; g.First()).ToList();
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/tptiX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tptiX.png" alt="enter image description here"></a></p>
  
  <p>The expected result would be:
  <a href="https://i.stack.imgur.com/yioHF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yioHF.png" alt="enter image description here"></a></p>