|
2:A[] Objects=new A()[2]; 3:怎么样对Objects 进行序列化,,单独对A[0]序列化可行,,但按照对单个对象的方式进行则会报错 怎么办? |
|
|
|
不明白啊
|
|
post the detailed error messages and/or some code? or see
XML Serialization in .NET http://www.codeproject.com/csharp/xmlserialize.asp?print=true Contact[] aContact = new Contact[table.Count]; table.Values.CopyTo( aContact, 0 ); // Deserialize the content of the Contact array to a XML file XmlSerializer x = new XmlSerializer( typeof(Contact[]) ); TextWriter writer = new StreamWriter( "phonebook.xml" ); x.Serialize( writer, aContact ); |
|
|