Store and Recover Information About Object Using Binary Serialization in C#

Topics: XML, Serialization, Component Object Model Pages: 4 (649 words) Published: April 22, 2013

Store and Recover Information about Object Using Binary Serialization in C#

What is Binary Serialization:
Serialization is the process taking an object and converting it to a format which can be transported through net work or store into a storage medium, the storage medium could be file, database, or memory.

The .NET Framework provides two types of serialization, XML serialization and Binary serialization.

There are also three formats provided by the Microsoft .NET framework to which objects can be serialized. The formats are binary, SOAP, and XML.

Binary serialization can either the binary or the SOAP formatter, are suitable for storing object Information in .NET applications, and you don’t need share the information with non-.NET programs. When I mention Binary serialization below I mean “Binary serialization” using binary formatter, as short expression.

Why use Binary Serialization:
The binary serialization working chart is:
The chart also can present the other two format of serialization. so why we use Binary serialization instead of use the other two? What the advantage and disadvantage of binary serialization?

The binary serialization is the most compact and light of the three formats and it is the fastest one of the three formats. Also the binary serialization can serialize all the state of the object, including type information. Therefore when the object is deserialized, you get an accurate and fully functional copy of the original, which xml will not It ignores private member fields and properties.

The main limitation of using binary serialization is that binary serialization depends on platform, while XML and SOAP do not adhere to that limitation.Therefore only when all your applications which use serialization are .net framework applications, you can use binary serialization, otherwise uses other two formats instead.

Using Binary Serialization in C#:
The code to using Binary serialize is very simple. The...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Essay on Improved Methodology for Data Transmission and Object Serialization using JSON
  • Essay about C and C stores case study
  • Binary Information Essay
  • Object Oriented Information Modelling Research Paper
  • Data Structure Using C++ Essay
  • Admin Store and Retrieve Information Essay
  • Binary Options Essay
  • C&C Grocery Stores Essay

Become a StudyMode Member

Sign Up - It's Free