ASP.NET 4 Unleashed

In this chapter, you learned how to work with the file system. First, you learned how to create and read both text and binary files. You also learned how to retrieve a list of files in a directory and manipulate file path information.

Next, you learned how to serialize objects to persistent mediums, such as the file system or a database. You learned how to use the BinaryFormatter to save an ArrayList to a file. You also learned how to use the BinaryFormatter to serialize a custom class to a database table.

You were also provided with an overview of the XmlSerializer class. You learned how to use the XmlSerializer to serialize and deserialize a custom class to an XML document. You also learned how to control exactly how a class is serialized by using attributes.

Категории