title: Pass a list of objects to a web service
body: <p>I have a DataObjects class that contains a UserEmail object that contains an int (EmailID) and a string (EmailAddress).</p>
  
  <p>Within a C# .net application, if I want to display a list of email addresses - I create and populate a list of UserEmail objects.</p>
  
  <pre><code>List&lt;DataObjects.UserEmails&gt; myUserEmailsList = new List&lt;DataObjects.UserEmails&gt;();
  </code></pre>
  
  <p>And use it as a datasource for whatever control I happen to be using.</p>
  
  <p>I need to pass that list to a web service. I can't see how to do this. If the other party writes a web service with a method that takes a list as a parameter - fine, I can call the web service and pass my list. But how will they be able to extract the data from the list - without having access to the classes that created the objects in the list?</p>
  
  <p>Is there a way of looping through a list of objects without knowing what the data structure of the object is?</p>