title: Concatenate variables by commas in C# winforms
body: <p>All this code works correctly. My question is for the variable lTest in the Messagebox, how can I display that list result concatenated by commas.                </p>
  
  <pre><code>List&lt;int&gt; lNetworkIds = new List&lt;int&gt;();
  Dictionary&lt;DisplayDay, int&gt; numDayOccurances = new Dictionary&lt;DisplayDay, int&gt;();
  
  foreach (Proposal lDetail in this._Proposal.Details)
  {
      if (!lNetworkIds.Contains(lDetail.NetworkId))
          lNetworkIds.Add(lDetail.NetworkId);
      if (!numDayOccurances.ContainsKey(lDetail.Day))
          numDayOccurances[lDetail.Day] = 0;
      numDayOccurances[lDetail.Day]++;
  }
  
  if (numDayOccurances.Count &gt; 0)
  { 
  
      string lTest = "";
      foreach (DisplayDay myday in numDayOccurances.Keys)
      {
  
          lTest += myday.ToString();
      }
  
      MessageBox.Show(lTest);
  
  }
  </code></pre>