Summary 

In this chapter, we learned about how we serialize and deserialize data while exchanging it over a network. We looked at the different techniques available for serialization and deserialization. We started with XmlSerialization and saw how we serialize the data to XML files. We also looked at different attribute tags, such as XmlArray, XmlArrayItem, and XmlIgnore, which we can place in the class object when it's being converted into an XML file. We then looked at binary serialization and learned the advantages it has compared to XmlSerialization. We also looked at the ISerializable interface and learned how it provides security while exchanging data over the network.

We then looked at different collection types available in C# and the scenarios in which we should use each of them. We looked at arrays and their restrictions in terms of the length or size of the array, which we must declare during the declaration of the array. We then looked at some other complex collection types, such as list and dictionary. Both of these collection items allow us to increase the collection size during execution but differ in the way they access data. A dictionary saves the data in KeyValuePair and enforces the uniqueness of the keys that are present in the collection type.

Then, we looked at queues and stack collection types. As opposed to lists and dictionaries, which allow random access to the data, stacks and queues allow us to access to data in a particular order. Queues follow the FIFO model, while stacks follow the FILO model.

..................Content has been hidden....................

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