Using system.collections; using system.runtime.serialization; using system.runtime.serialization.formatters.binary;
A summary description description of Namespace Serialize {///
Stream Sr = file.openread ("personlist.bin"); Person zhansan = (Person) bf.deSerialize (sr); console.writeline ("{0}, {1}, {2}, {3}", Person == ZHANSAN, P == Person, zhansan.id, zhansan.Name); console.readline ();}
[Serializable] public class person: iCloneable {public string id; public string name; public person () {} // public person (Person P) // {///} public person (String ID, String name) {this .id = id; this.name = name;} // public object clone () // {// Person Temp = new person () (); // Temp.id = this.id; // Temp.name = THIS. Name; //// Return Temp; //////} public object clone () {return this
}
}}}