XmlRoot or XmlType Serialize ICollection Interface


Q

Q. John Chen

I created a class that implements ICollection. After serializing got
following result:

<?xml version=\"1.0\" encoding=\"utf-16\">
<ArrayOfCustomer>
<Customer>
<FirstName>John</FirstName>
<LastName>Johnson</LastName>
</Customer>
<Customer>
<FirstName>Jack</FirstName>
<LastName>Jackson</LastName>
</Customer>
</ArrayOfCustomer>

I don't like the <ArrayOfCustomer> tag. I WANT it be <Customers>

Thanks

John
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top