Here is an example based on the Advanced Tutorial, Learning Boo Kung-Fu.
Note, you have to compile this to an exe and then run it. It won't work in booi, because types in dynamically generated assemblies can't be serialized apparently.
For more info on XML Serialization in .NET and Mono, see these tutorials:
- Introducing XML Serialization
- XML Serialization in C#
- XML Serialization in the .NET Framework
- How to Serialize a Hashtable (and a Date).
(you can serialize a hashtable using binary instead of xml, see below)
Non-XML (Binary) Serialization
This is useful when you really just want to store and retrieve an object like a dictionary/hashtable, and you don't need to use XML.