Tag | Serialization Posts

Technorati Tags: Serialization,ISerializable... Patterns You know that when you serialize an object and then deserialize the main object and the deserialized one are different objects (different references). So what if you do not intend such behavior i.e in a singleton class. I’m almost certain that everyone is familiar with singleton pattern that solves the problem of having only 1 instance of a class in the entire application; so I’m not giving a speech about that here. Assume we ...
I ran into the same old "cannot serialize value myType of type myType" issue the other day and knew immediately that I should check that my classes were marked with the [Serializable] attribute. Well, I checked and all of the classes had the attribute as required. So I spent an hour our so searching the web for other reasons why we might get this error. I found nothing. So I pinged a buddy of mine and I walked him through the issue. He said, "It's gotta be one of your classes missing the Serializable ...
Ran into a serialization problem with WCF the other day that was rather interesting to find and fix. It wasn't a problem with WCF, in the end, but rather with what we were telling WCF to do. So we have some complex entities that we're shoving through the serialization layer. We also send through lists of these entities, and the list may have references to itself. To keep our list sizes small, we've implemented a DataContractSerializerOpera... where when we create the data serializer, we ...