title: How do I return an array/list/collection of objects from C# to VB6
body: <p>I am creating a COM Visible C# object to proxy calls to a webservice for VB6 application. I have a method that returns an array of objects.</p>
  
  <pre><code>public DocActionReport[] DocActionReportByDateRange(System.DateTime reportStartDate, System.DateTime reportEndDate)
  {
      object[] results = this.Invoke("DocActionReportByDateRange", new object[] {
                  reportStartDate,
                  reportEndDate});
      return ((DocActionReport[])(results[0]));
  }
  </code></pre>
  
  <p>When I call this method via VB6, like so:</p>
  
  <pre><code>Dim proxy As New QueueMovementServiceClient.ReadQueueInfo
  Dim report() As QueueMovementServiceClient.DocActionReport
  
  report = proxy.DocActionReportByDateRange(startDate, reportEndDate)
  </code></pre>
  
  <p>It successfully executes (I can see that via logging on the web service) but no data is returned to the object in VB6 (<code>LBound(report) == 0, UBound(report) == -1</code>).</p>
  
  <p>I have tried a couple of different approaches (changing the method to a void method and passing the collection in as a <code>ref</code> parameter) but no joy so far.</p>
  
  <p>What do I need to do to return an array of objects (list, collection, whatever) to a VB6 consumer?</p>