Often, the software you create must have the ability to persist data for later retrieval. When the data you save is only for your application or you are looking for an efficient way of storing your objects, BinaryFormatter is the answer. BinaryFormatter class is in the System.Runtime.Serialization.Formatters.Binary namespace. The BinaryFormatter class allows you to quickly convert objects into binary form for saving to a file or sending across network. The primary requirement for enabling serialization is marking the type as Serializable. In C#
More...