111,092
社区成员




[Serializable]
public class ClassToBeSerialize : IXmlSerializable
{
public Type AType {set;get;}
//--------------------------------------------------------
public System.Xml.Schema.XmlSchema GetSchema()
{
return null;
}
public void ReadXml(XmlReader reader)
{
if( reader.Read() && reader.IsStartElement("AType") )
{
string typeName = reader.ReadString();
this.AType = Type.GetType(typeName);
}
}
public void WriteXml(XmlWriter writer)
{
writer.WriteElementString("AType", this.AType == null ? "" : this.AType.FullName);
}
//-------------------------------------------------------
}