序列化类型问题
using System.Xml.Serialization;
using System.Collections;
namespace CommonLibrary.Email {
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://www.sunny.com ")]
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://www.sunny.com ", IsNullable = false)]
public class MailAccounts {
private MailAccount[] accountField;
[System.Xml.Serialization.XmlElementAttribute( "Account ")]
public MailAccount[] Account
{
get
{
return this.accountField;
}
set
{
this.accountField = value;
}
}
//[System.Xml.Serialization.XmlArrayItemAttribute(IsNullable = false)]
private MailCollections accounts = new MailCollections();
[System.Xml.Serialization.XmlArrayItemAttribute(IsNullable = true)]
public MailCollections Accounts
{
get { return this.accounts; }
set { this.accounts = value; }
}
}
public class MailCollections : CollectionBase
{
public MailAccount this[int inx]
{
get
{
return ((MailAccount)(base.InnerList[inx]));