You need to store a serializable object and its state to a file, and then deserialize it later.
Use a formatter to serialize the object and write it to a System.IO.FileStream object. When you need to retrieve the object, use the same type of formatter to read the serialized data from the file and deserialize the object. The .NET Framework class library includes the following formatter implementations for serializing objects to binary or SOAP format:
How It Works
Using the BinaryFormatter and SoapFormatter classes, you can serialize an instance of any serializable ...