title: How to group in linq list and concatenate some string in c# linq
body: <p>I have a domain entity called "HoldItems" and i created a list of HoldItems object. </p>
  
  <p>All the attribute on that HoldItems are:</p>
  
  <pre><code>public int TransactionNo;
  public int TransactionID;
  public int ItemNo;
  public String ItemName;
  public int Qty;
  public double Price;
  public double TotalPrice;
  public double DiscountPrice;
  public int ItemType;
  public bool VatInclude;
  public double VatPrice;
  public string Note;
  public List&lt;HoldExtraMenu&gt; ExtraMenuList;
  public string BelongCategoryName;
  public int BelongItemNo;
  public int BelongItemIndex;
  public int BelongCategoryID;
  </code></pre>
  
  <p>I wrote some LINQ query like this, that selectedItemList represent <code>List&lt;DomainEntities.HoldItems&gt;</code></p>
  
  <pre><code>var results = from myobject in selectedItemList
                where myobject.ItemType == 5
                where myobject.BelongItemIndex==selectedItemList.IndexOf(C)                                      
                orderby myobject.BelongCategoryName                                                                            
                select myobject;
  </code></pre>
  
  <p>Now the question is, I need to group this result by BelongCategoryName and concatenate output column for ItemName using add ","</p>