I am using XmlSerializer class to serialize object into xml file and transfer over wire.
I have created following data structure which contents data and transfer over wire.

```
 [Serializable]
 public class MailItem
{
    public string UniqueEmailId { get; set; }
    public string SenderEmailId { get; set; }
    public string[] ToRecipientEmailId { get; set; }
}

```

Now when I am converting to xml it emits following result –

```
<?xml version="1.0" encoding="utf-16"?>
<MailItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <UniqueEmailId>SomeUniqueID</UniqueEmailId>
  <SenderEmailId>sender@email.id</SenderEmailId>
  <ToRecipientEmailId>
    <string>To@email.id</string>
    <string>To1@email.id</string>
    <string>To2@email.id</string>
  </ToRecipientEmailId>  
</MailItem>

```

Expected result is (observe child elements of ToRecipientEmailId) –

```
<?xml version="1.0" encoding="utf-16"?>
<MailItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <UniqueEmailId>SomeUniqueID</UniqueEmailId>
  <SenderEmailId>sender@email.id</SenderEmailId>
  <ToRecipientEmailId>
    <EmailId>To@email.id</EmailId>
    <EmailId>To1@email.id</EmailId>
    <EmailId>To2@email.id</EmailId>
  </ToRecipientEmailId>  
</MailItem>

```

When I created another class with Email and EmailId as property into it then it gives me following result –

```
[Serializable]
     public class MailItem
    {
        public string UniqueEmailId { get; set; }
        public string SenderEmailId { get; set; }
        public List<Email> ToRecipientEmailId { get; set; }
    }         

   public class Email
    {
        public string EmailID {get;set;}
    }

<?xml version="1.0" encoding="utf-16"?>
<MailItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <UniqueEmailId>SomeUniqueID</UniqueEmailId>
  <SenderEmailId>sender@email.id</SenderEmailId>
  <ToRecipientEmailId>
    <Email>
      <EmailID>To@email.id</EmailID>
    </Email>
    <Email>
      <EmailID>To1@email.id</EmailID>
    </Email>
    <Email>
      <EmailID>To2@email.id</EmailID>
    </Email>
  </ToRecipientEmailId> 
</MailItem>

```

It would be great if someone let me know how to achieve desired result. What changes I need to make in data structure ?