Serialization, Deserialization, and Collections

When a .NET application interacts with an external network, the data being exchanged must be transformed into a flat or binary format. Similarly, when the data is retrieved from external applications, binary data needs to be formatted to objects on which they can then be worked upon. This is done via the serialization and deserialization of data using different approaches. The process of changing objects into binary format is referred to as serialization. Deserialization is the reverse of serialization. In involves transforming binary data into its object representation so that it can be used in the application.

In this chapter, we will work on different serialization and deserialization approaches available in the .NET Framework. We will look into XML serialization, JSON serialization, and binary serialization. We will also look at how we define data contracts in web services to inform the consuming application of the format of the data that is to be exchanged between different applications. 

We will then look at how we can use different collections objects such as arrays, lists, dictionary, queues, and stacks and we'll learn how they can be used for storing and consuming data. Finally, we will look at different things that help us choose collection objects while working with .NET applications.

We will cover the following topics in this chapter:

  • Serialization and deserialization
  • Working with collections
  • Choosing a collection
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.0.248