title: GroupBy : how to handle empty groups?
body: <p>I am trying to group elements from a list of custom objects.</p>
  
  <p>The object:</p>
  
  <pre><code>Public class MyObj
  {
      public string groupName{ get; set; }
      public int year{ get; set; }
  
      public MyObj(string groupName)
      {
          this.GroupName = groupName;
      }    
  
      public MyObj(string groupName, int year)
      {
          this.GroupName = groupName;
          this.Year = year;
      }
  }
  </code></pre>
  
  <p>The list : </p>
  
  <pre><code>List&lt;MyObj&gt; list = new List&lt;MyObj&gt;();
  list.Add(new MyObj("group1", 2012));
  list.Add(new MyObj("group1", 2013));
  list.Add(new MyObj("group2", 2012));
  list.Add(new MyObj("group2", 2013));
  list.Add(new MyObj("group3"));
  list.Add(new MyObj("group3"));
  </code></pre>
  
  <p>If I do something like :</p>
  
  <pre><code>IEnumerable&lt;IGrouping&lt;string, MyObj&gt;&gt; listMyObj = list.GroupBy(o =&gt; o.Year);
  </code></pre>
  
  <p>"group3" will ne be included in the result list.
  How can I group my MyObjs by Year and keep an empty "group3" item in the result ?</p>