title: c# Displaying List<Entity> into a list box
body: <p>i'm currently working on a project where I'm trying to pull a solution from a system, and then display information about that solution in a listbox.</p>
  
  <pre><code>public static class SolutionActions
  {
      public static List&lt;Entity&gt; getAllSolutions(IOrganizationService _serviceProxy)
      {
          QueryExpression querySampleSolution = new QueryExpression
          {
              EntityName = "solution",
              ColumnSet = new ColumnSet(new string[] { "publisherid", "installedon", "version", "versionnumber", "friendlyname", "uniquename" }),
              Criteria = new FilterExpression(),
              NoLock = true,           
          };
  
          EntityCollection foundSolutions = _serviceProxy.RetrieveMultiple(querySampleSolution);
          return foundSolutions.Entities.ToList();
      }
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>if (sourceConnection != null)
  {
      List&lt;Entity&gt; foundSolutions = SolutionActions.getAllSolutions(sourceConnection._orgService);
      //listSolutions.Items.AddRange(foundSolutions.ToArray());
      listSolutions.DataSource = foundSolutions;
  }
  </code></pre>
  
  <p>I was just wondering if any of you had tips for how I could get the listbox to display PublishID, Installedon and such.</p>