Hi,
Is it true that every object that use .ToString() in asp.net can be called as serialization ? If yes then why and if no then why not..
Thanks
Hi,
Is it true that every object that use .ToString() in asp.net can be called as serialization ? If yes then why and if no then why not..
Thanks
No, this is not true. If an object overrides ToString
it means that you can print its values but the process is not necessary reversible. Serialization is a reversible process when an object instance is converted to some format. Deserialization is the inverse process when an object instance is created from some format. In .NET common formats for serializing objects are XML and binary. For binary serialization types need to be decorated with the [Serializable]
attribute.
All objects inherit tostring() from Object, but not all objects are serializable. Serialization does not involve the tostring method.