What is the difference between serializable objects and non-serializable objects in C#, and what makes an object serializable?
What do serializable objects have to do with XML?
what is the differnce Serializable objects vs non serialivable objects
A serializable object can be converted into some other representation such as text in order to be easily transmitted across process boundaries while a non-serializable object cannot.
And what makes an object serialiable
In .NET depending on the serializer you decide to use, the object needs to correspond to certain requirements. For example if you use the BinaryFormatter your object needs to be decorated with the [Serializable]
attribute.
And What does serializable objects have to do with xml
An object could be serialized into XML. In .NET this could be achieved for example with the XmlSerializer class but also with the DataContractSerializer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With