Impact of not marking a class <Serializable ()>
You can mark a class as serializable using SerializableAttribute . However, you can still serialize an object without marking it as serializable. What is the effect of this?
I assume that when you say, "You can still serialize an object without labeling it serializable," you mean that you are serializing / deserializing yourself.
Adding the [Serializable] attribute indicates third-party code that the object can be serialized. This is especially useful if you want to save an object in an ASP.NET session or in another tool (for example, in the Memcached cache).
Putting [Serializable]in a type allows you to use it with APIs [System.Runtime.Serialization][1]that are very convenient for the most common scenarios and save you from writing a lot of repeated code to serialize / deserialize your objects, which is usually cumbersome to test and error prone. And they get some flexibility in terms of basic storage mechanisms (e.g. Binary, XML, SOAP ...).
[Serializable] , , / , , ISerializble . , , , .
, , Serializable , ( ), , , , , Serializable.