Free mag vol1 | Page 842

CHAPTER 20  FILE I/O AND OBJECT SERIALIZATION } Console.WriteLine("=> Saved car in binary format!"); The BinaryFormatter.Serialize() method is the member responsible for composing the object graph and moving the byte sequence to some Stream-derived type. In this case, the stream happens to be a physical file. You could also serialize your object types to any Stream-derived type, such as a memory location or network stream. After you run your program, you can view the contents of the CarData.dat file that represents this instance of the JamesBondCar by navigating t