title: Categorize duplicate elements under same key
body: <p>I have this list:</p>
  
  <pre><code>public class Connection
  {
      public string Name { get; set; }
      public string IP { get; set; }
  }
  
  List&lt;Connection&gt; connectionsList;
  </code></pre>
  
  <p>I want to get all the <code>Name</code> from the list that are sharing the same <code>IP</code>.
  I've tried:</p>
  
  <pre><code>    var duplicateIPConnections =
          connectionsList.GroupBy(x =&gt; x.IP)
              .Where(g =&gt; g.Count() &gt; 1)
              .SelectMany(g =&gt; g);
  </code></pre>
  
  <p>But the result is an enumerable with all the elements appearing after each other.
  What I want is that the elements will be sorted <strong>under</strong> the <code>IP</code> that they both sharing.</p>