serializacja XML i serialziacja binarna

XmlSerializer serializer = new XmlSerializer(typeof(Zawodnik[])); // Create a FileStream to write with. Stream writer = new FileStream(@”c:\dane\aa.xml”, FileMode.Create); // Serialize the object, and close the TextWriter serializer.Serialize(writer, zawodnicy); writer.Close(); StreamReader reader = new StreamReader(@”c:\dane\aa.xml”); var a = (Zawodnik[])serializer.Deserialize(reader); reader.Close(); binary // Serialize object. IFormatter formatter = new BinaryFormatter(); Stream stream = new FileStream(„Person.bin”, FileMode.Create, FileAccess.Write,